3.4 Standard Module UserList

 

This module defines a class that acts as a wrapper around list objects. It is a useful base class for your own list-like classes, which can inherit from them and override existing methods or add new ones. In this way one can add new behaviours to lists.

The UserList module defines the UserList class:

UserList ([list])
Return a class instance that simulates a list. The instance's contents are kept in a regular list, which is accessible via the data attribute of UserList instances. The instance's contents are initially set to a copy of list, defaulting to the empty list []. list can be either a regular Python list, or an instance of UserList (or a subclass).

data
A real Python list object used to store the contents of the UserList class.


guido@python.org