class ListMixin: (source)
Known subclasses: django.contrib.gis.geos.geometry.GEOSGeometry
A base class which provides complete list interface. Derived classes must call ListMixin's __init__() function and implement the following: function _get_single_external(self, i): Return single item with index i for general use. The index i will always satisfy 0 <= i < len(self). function _get_single_internal(self, i): Same as above, but for use within the class [Optional] Note that if _get_single_internal and _get_single_internal return different types of objects, _set_list must distinguish between the two and handle each appropriately. function _set_list(self, length, items): Recreate the entire object. NOTE: items may be a generator which calls _get_single_internal. Therefore, it is necessary to cache the values in a temporary: temp = list(items) before clobbering the original storage. function _set_single(self, i, value): Set the single item at index i to value [Optional] If left undefined, all mutations will result in rebuilding the object using _set_list. function __len__(self): Return the length int _minlength: The minimum legal length [Optional] int _maxlength: The maximum legal length [Optional] type or tuple _allowed: A type or tuple of allowed item types [Optional]
Method | __add__ |
add another list-like object |
Method | __delitem__ |
Delete the item(s) at the specified index/slice. |
Method | __eq__ |
Undocumented |
Method | __getitem__ |
Get the item(s) at the specified index/slice. |
Method | __iadd__ |
add another list-like object to self |
Method | __imul__ |
multiply |
Method | __init__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __mul__ |
multiply |
Method | __radd__ |
add to another list-like object |
Method | __rmul__ |
multiply |
Method | __setitem__ |
Set the item(s) at the specified index/slice. |
Method | append |
Standard list append method |
Method | count |
Standard list count method |
Method | extend |
Standard list extend method |
Method | index |
Standard list index method |
Method | insert |
Standard list insert method |
Method | pop |
Standard list pop method |
Method | remove |
Standard list remove method |
Method | reverse |
Standard list reverse method |
Method | sort |
Standard list sort method |
Method | _assign |
Assign an extended slice by re-assigning individual items |
Method | _assign |
Assign an extended slice by rebuilding entire list |
Method | _assign |
Assign a simple slice; Can assign slice of any length |
Method | _check |
Undocumented |
Method | _checkindex |
Undocumented |
Method | _rebuild |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Assign values to a slice of the object |
Class Variable | _maxlength |
Undocumented |
Class Variable | _minlength |
Undocumented |
Instance Variable | _get |
Undocumented |
Instance Variable | _set |
Undocumented |
django.contrib.gis.geos.linestring.LineString
, django.contrib.gis.geos.point.Point
, django.contrib.gis.geos.polygon.Polygon
Undocumented
django.contrib.gis.geos.collections.GeometryCollection
, django.contrib.gis.geos.polygon.Polygon
Undocumented