collections.UserList

class collections.UserList([list])

Class 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 any iterable, for example a real Python list or a UserList object.

In addition to supporting the methods and operations of mutable sequences, UserList instances provide the following attribute:

data

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

doc_python
2016-10-07 17:29:02
Comments
Leave a Comment

Please login to continue.