org.python.core
public class PyList extends PySequenceList
| Field Summary | |
|---|---|
| static Class | exposed_base |
| static String | exposed_name |
| Constructor Summary | |
|---|---|
| PyList() | |
| PyList(PyType type) | |
| PyList(PyType type, PyObject[] elements) | |
| PyList(PyType type, Collection c) | |
| PyList(Vector v) | |
| PyList(PyObject[] elements) | |
| PyList(PyObject o) | |
| Method Summary | |
|---|---|
| void | append(PyObject o)
Add a single element to the end of list.
|
| static void | classDictInit(PyObject dict) |
| int | count(PyObject o)
Return the number elements in the list that equals the argument.
|
| void | extend(PyObject o)
Append the elements in the argument sequence to the end of the list.
|
| int | hashCode() |
| int | index(PyObject o)
return smallest index where an element in the list equals
the argument.
|
| int | index(PyObject o, int start) |
| int | index(PyObject o, int start, int stop) |
| void | insert(int index, PyObject o)
Insert the argument element into the list at the specified
index.
|
| PyObject | pop()
Removes and return the last element in the list. |
| PyObject | pop(int n)
Removes and return the n indexed element in the
list.
|
| void | remove(PyObject o)
Remove the first occurence of the argument from the list.
|
| void | reverse()
Reverses the items of s in place.
|
| String | safeRepr() |
| void | sort(PyObject compare)
Sort the items of the list in place. |
| void | sort()
Sort the items of the list in place. |
| String | toString() |
| static void | typeSetup(PyObject dict, PyType.Newstyle marker) |
| PyObject | __add__(PyObject o) |
| PyTuple | __getnewargs__() |
| PyObject | __iadd__(PyObject o) |
| PyObject | __imul__(PyObject o) |
| int | __len__() |
| PyObject | __radd__(PyObject o) |
| PyObject | __reduce__()
Used for pickling.
|
Parameters: o the element to add.
Parameters: o the argument to test for. Testing is done with
the == operator.
s[len(s):len(s)] = o.
Parameters: o the sequence of items to append to the list.
Parameters: o the argument to test for. Testing is done with
the == operator.
s[index:index] = [o] if index >= 0.
Parameters: index the position where the element will be inserted. o the element to insert.
n indexed element in the
list.
Parameters: n the index of the element to remove and return.
== operator.
del s[s.index(x)]
Parameters: o the element to search for and remove.
Parameters: compare the comparison function.
Returns: a tuple of (class, tuple)