| | |
- __builtin__.object
-
- array
ArrayType = class array(__builtin__.object) |
| |
An array represents basic values and behave very much like lists, except
the type of objects stored in them is constrained.
Methods:
append() -- append a new item to the end of the array
buffer_info() -- return information giving the current memory info
byteswap() -- byteswap all the items of the array
count() -- return number of occurences of an object
extend() -- extend array by appending array elements
fromfile() -- read items from a file object
fromlist() -- append items from the list
fromstring() -- append items from the string
index() -- return index of first occurence of an object
insert() -- insert a new item into the array at a provided position
pop() -- remove and return item (default last)
read() -- DEPRECATED, use fromfile()
remove() -- remove first occurence of an object
reverse() -- reverse the order of the items in the array
tofile() -- write all items to a file object
tolist() -- return the array converted to an ordinary list
tostring() -- return the array converted to a string
write() -- DEPRECATED, use tofile()
Variables:
typecode -- the typecode character used to create the array
itemsize -- the length in bytes of one array item |
| |
Methods defined here:
- __add__(...)
- x.__add__(y) <==> x+y
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __delslice__(...)
- x.__delslice__(i, j) <==> del x[i:j]
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __getslice__(...)
- x.__getslice__(i, j) <==> x[i:j]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __mul__(...)
- x.__mul__(n) <==> x*n
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __repr__(...)
- x.__repr__() <==> repr(x)
- __rmul__(...)
- x.__rmul__(n) <==> n*x
- __setitem__(...)
- x.__setitem__(i, y) <==> x[i]=y
- __setslice__(...)
- x.__setslice__(i, j, y) <==> x[i:j]=y
Methods inherited from __builtin__.object:
- __delattr__(...)
- x.__delattr__('name') <==> del x.name
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __hash__(...)
- x.__hash__() <==> hash(x)
- __init__(...)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- __reduce__(...)
- helper for pickle
- __setattr__(...)
- x.__setattr__('name', value) <==> x.name = value
- __str__(...)
- x.__str__() <==> str(x)
Data and non-method functions inherited from __builtin__.object:
- __class__ = <type 'type'>
- the object's class
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
| |