Teks sumber — English
Terjemahan — Bahasa Indonesia
:class:`UserList`
:class:`UserList`
:class:`UserList` objects
objek :class:`UserList`
Class that simulates a list. The instance's contents are kept in a regular list, which is accessible via the :attr:`data` attribute of :class:`UserList` instances. The instance's contents are initially set to a copy of *list*, defaulting to the empty list ``[]``. *list* can be any iterable, for example a real Python list or a :class:`UserList` object.
In addition to supporting the methods and operations of mutable sequences, :class:`UserList` instances provide the following attribute:
A real :class:`list` object used to store the contents of the :class:`UserList` class.
**Subclassing requirements:** Subclasses of :class:`UserList` are expected to offer a constructor which can be called with either no arguments or one argument. List operations which return a new sequence attempt to create an instance of the actual implementation class. To do so, it assumes that the constructor can be called with a single parameter, which is a sequence object used as a data source.