pycocoa.lists.List

Package pycocoa :: Module lists :: Class List |
[frames] | no frames]

# Class List

      object --+
               |
    bases._Type0 --+
                   |
        tuples.Tuple --+
                       |
                      List

Python `list` Type, wrapping an ObjC `NSMutableArray`.

Instance Methods
__init__(self, ns_list=`[``]`) New List from a `list`, List, Tuple or `NSMutableArray`. |
__setitem__(self, index, value) |
__delitem__(self, index) |
append(self, value) Add an item to this list, like `list.append`. |
clear(self) Remove all items from this list, like `list.clear`. |
copy(self, *ranged) Make a shallow copy of this list. |
extend(self, values) Add one or more items to this list, like `list.extend`. |
insert(self, index, value) Insert an item into this list, like `list.insert`. |
pop(self, index=-1) Remove an item from this list, like `list.pop`. |
remove(self, value, identical=False) Remove an item from this list, like `list.remove`. |
reverse(self) Reverse this list in-place, like `list.reverse`. |
Inherited from `tuples.Tuple`: `__contains__`, `__eq__`, `__getitem__`, `__iter__`, `__len__`, `__ne__`, `__reversed__`, `count`, `index` Inherited from `bases._Type0`: `__repr__`, `__str__`, `type2strepr` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
Inherited from `bases._Type0`: `NS`, `NSDelegate`, `typename` Inherited from `object`: `__class__`

Method Details

### __init__(self, ns_list=`[``]`) (Constructor) |
New List from a `list`, List, Tuple or `NSMutableArray`. Overrides: object.__init__

### __setitem__(self, index, value) (Index assignment operator) |
Overrides: tuples.Tuple.__setitem__

### __delitem__(self, index) (Index deletion operator) |
Overrides: tuples.Tuple.__delitem__

### append(self, value) |
Add an item to this list, like `list.append`. Overrides: tuples.Tuple.append

### clear(self) |
Remove all items from this list, like `list.clear`. Overrides: tuples.Tuple.clear

### copy(self, *ranged) |
Make a shallow copy of this list. Parameters: `ranged` - Optional index range. Returns: The copy (List). Overrides: tuples.Tuple.copy

### extend(self, values) |
Add one or more items to this list, like `list.extend`. Overrides: tuples.Tuple.extend

### insert(self, index, value) |
Insert an item into this list, like `list.insert`. Overrides: tuples.Tuple.insert

### pop(self, index=-1) |
Remove an item from this list, like `list.pop`. Overrides: tuples.Tuple.pop

### remove(self, value, identical=False) |
Remove an item from this list, like `list.remove`. Parameters: `idential` - Use ObjC `idential` as comparison (bool).