org.python.core
public class PyObject extends Object implements Serializable
PyObject
or one of
its subclasses.
Nested Class Summary | |
---|---|
static class | PyObject.ConversionException |
Field Summary | |
---|---|
static String | exposed_name |
Constructor Summary | |
---|---|
PyObject(PyType objtype) | |
PyObject()
The standard constructor for a PyObject . |
Method Summary | |
---|---|
int | asInt(int index) |
long | asLong(int index) |
String | asName(int index) |
String | asString(int index) |
String | asStringOrNull(int index) |
void | delDict() |
void | delType() |
void | dispatch__init__(PyType type, PyObject[] args, String[] keywords)
Dispatch __init__ behavior |
boolean | equals(Object ob_other)
Should almost never be overridden.
|
PyObject | fastGetClass() |
PyObject | fastGetDict() xxx implements where meaningful |
PyObject | getDict() xxx implements where meaningful |
PyObject | getDoc() |
PyType | getType() |
int | hashCode() |
boolean | implementsDescrDelete() |
boolean | implementsDescrSet() |
PyObject | invoke(String name, PyObject[] args, String[] keywords)
Shortcut for calling a method on a PyObject from Java.
|
PyObject | invoke(String name, PyObject[] args) |
PyObject | invoke(String name)
Shortcut for calling a method on a PyObject with no args.
|
PyObject | invoke(String name, PyObject arg1)
Shortcut for calling a method on a PyObject with one arg.
|
PyObject | invoke(String name, PyObject arg1, PyObject arg2)
Shortcut for calling a method on a PyObject with two args.
|
boolean | isCallable() |
boolean | isDataDescr() |
boolean | isMappingType() |
boolean | isNumberType() |
boolean | isSequenceType() |
void | noAttributeError(String name) |
void | readonlyAttributeError(String name) |
String | safeRepr() |
void | setDict(PyObject newDict) |
void | setType(PyType type) |
String | toString() |
static void | typeSetup(PyObject dict, PyType.Newstyle marker) |
PyObject | _add(PyObject o2)
Implements the Python expression this + o2 |
PyObject | _and(PyObject o2)
Implements the Python expression this & o2 |
PyObject | _callextra(PyObject[] args, String[] keywords, PyObject starargs, PyObject kwargs) |
int | _cmp(PyObject o)
Implements cmp(this, other)
|
PyObject | _div(PyObject o2)
Implements the Python expression this / o2 |
PyObject | _divmod(PyObject o2)
Implements the Python expression this divmod o2 |
PyObject | _doget(PyObject container) |
PyObject | _doget(PyObject container, PyObject wherefound) |
boolean | _doset(PyObject container, PyObject value) |
PyObject | _eq(PyObject o)
Implements the Python expression this == other .
|
PyObject | _floordiv(PyObject o2)
Implements the Python expression this // o2 |
PyObject | _ge(PyObject o)
Implements the Python expression this >= other .
|
PyObject | _gt(PyObject o)
Implements the Python expression this > other .
|
PyObject | _in(PyObject o)
Implements in operator.
|
PyObject | _is(PyObject o)
Implements is operator.
|
PyObject | _isnot(PyObject o)
Implements is not operator.
|
PyObject | _jcall(Object[] args) |
PyObject | _jcallexc(Object[] args)
A convenience function for PyProxy's. |
void | _jthrow(Throwable t) |
PyObject | _le(PyObject o)
Implements the Python expression this <= other .
|
PyObject | _lshift(PyObject o2)
Implements the Python expression this << o2 |
PyObject | _lt(PyObject o)
Implements the Python expression this < other .
|
PyObject | _mod(PyObject o2)
Implements the Python expression this % o2 |
PyObject | _mul(PyObject o2)
Implements the Python expression this * o2 |
PyObject | _ne(PyObject o)
Implements the Python expression this ! |
PyObject | _notin(PyObject o)
Implements not in operator.
|
PyObject | _or(PyObject o2)
Implements the Python expression this | o2 |
PyObject | _pow(PyObject o2)
Implements the Python expression this ** o2 |
PyObject | _rshift(PyObject o2)
Implements the Python expression this >> o2 |
PyObject | _sub(PyObject o2)
Implements the Python expression this - o2 |
PyObject | _truediv(PyObject o2)
Implements the Python expression this / o2 |
PyObject | _xor(PyObject o2)
Implements the Python expression this ^ o2 |
PyObject | __abs__()
Equivalent to the standard Python __abs__ method.
|
PyObject | __add__(PyObject other)
Equivalent to the standard Python __add__ method |
PyObject | __and__(PyObject other)
Equivalent to the standard Python __and__ method |
PyObject | __call__(PyObject[] args, String[] keywords)
The basic method to override when implementing a callable object.
|
PyObject | __call__(PyObject arg1, PyObject[] args, String[] keywords)
A variant of the __call__ method with one extra initial argument.
|
PyObject | __call__(PyObject[] args)
A variant of the __call__ method when no keywords are passed. |
PyObject | __call__()
A variant of the __call__ method with no arguments. |
PyObject | __call__(PyObject arg0)
A variant of the __call__ method with one argument. |
PyObject | __call__(PyObject arg0, PyObject arg1)
A variant of the __call__ method with two arguments. |
PyObject | __call__(PyObject arg0, PyObject arg1, PyObject arg2)
A variant of the __call__ method with three arguments. |
PyObject | __call__(PyObject arg0, PyObject arg1, PyObject arg2, PyObject arg3)
A variant of the __call__ method with four arguments. |
int | __cmp__(PyObject other)
Equivalent to the standard Python __cmp__ method.
|
Object | __coerce_ex__(PyObject o)
Implements numeric coercion
|
PyObject | __coerce__(PyObject pyo)
Equivalent to the standard Python __coerce__ method.
|
PyComplex | __complex__()
Equivalent to the standard Python __complex__ method.
|
boolean | __contains__(PyObject o)
Equivalent to the standard Python __contains__ method.
|
void | __delattr__(PyString name)
Equivalent to the standard Python __delattr__ method.
|
void | __delattr__(String name)
A variant of the __delattr__ method which accepts a String
as the key. |
void | __delete__(PyObject obj) |
void | __delitem__(PyObject key)
Equivalent to the standard Python __delitem__ method.
|
void | __delitem__(String key)
A variant of the __delitem__ method which accepts a String
as the key. |
void | __delslice__(PyObject s_start, PyObject s_stop, PyObject s_step) |
void | __delslice__(PyObject start, PyObject stop) |
PyObject | __dir__()
Equivalent to the standard Python __dir__ method.
|
PyObject | __divmod__(PyObject other)
Equivalent to the standard Python __divmod__ method |
PyObject | __div__(PyObject other)
Equivalent to the standard Python __div__ method |
PyObject | __eq__(PyObject other)
Equivalent to the standard Python __eq__ method.
|
PyObject | __findattr__(PyString name)
Very similar to the standard Python __getattr__ method. |
PyObject | __findattr__(String name)
A variant of the __findattr__ method which accepts a Java
String as the name.
|
PyObject | __finditem__(PyObject key)
Very similar to the standard Python __getitem__ method.
|
PyObject | __finditem__(int key)
A variant of the __finditem__ method which accepts a primitive
int as the key. |
PyObject | __finditem__(String key)
A variant of the __finditem__ method which accepts a Java
String as the key. |
PyFloat | __float__()
Equivalent to the standard Python __float__ method.
|
PyObject | __floordiv__(PyObject other)
Equivalent to the standard Python __floordiv__ method |
PyObject | __getattr__(PyString name)
Equivalent to the standard Python __getattr__ method.
|
PyObject | __getattr__(String name)
A variant of the __getattr__ method which accepts a Java
String as the name.
|
PyObject | __getitem__(int key)
Equivalent to the standard Python __getitem__ method.
|
PyObject | __getitem__(PyObject key)
Equivalent to the standard Python __getitem__ method.
|
PyTuple | __getnewargs__() |
PyObject | __getslice__(PyObject s_start, PyObject s_stop, PyObject s_step) |
PyObject | __getslice__(PyObject start, PyObject stop) |
PyObject | __get__(PyObject obj, PyObject type) |
PyObject | __ge__(PyObject other)
Equivalent to the standard Python __ge__ method.
|
PyObject | __gt__(PyObject other)
Equivalent to the standard Python __gt__ method.
|
PyInteger | __hash__()
Equivalent to the standard Python __hash__ method. |
PyString | __hex__()
Equivalent to the standard Python __hex__ method
Should only be overridden by numeric objects that can be
reasonably represented as a hexadecimal string.
|
PyObject | __iadd__(PyObject other)
Equivalent to the standard Python __iadd__ method |
PyObject | __iand__(PyObject other)
Equivalent to the standard Python __iand__ method |
PyObject | __idivmod__(PyObject other)
Equivalent to the standard Python __idivmod__ method |
PyObject | __idiv__(PyObject other)
Equivalent to the standard Python __idiv__ method |
PyObject | __ifloordiv__(PyObject other)
Equivalent to the standard Python __ifloordiv__ method |
PyObject | __ilshift__(PyObject other)
Equivalent to the standard Python __ilshift__ method |
PyObject | __imod__(PyObject other)
Equivalent to the standard Python __imod__ method |
PyObject | __imul__(PyObject other)
Equivalent to the standard Python __imul__ method |
PyObject | __int__()
Equivalent to the standard Python __int__ method.
|
PyObject | __invert__()
Equivalent to the standard Python __invert__ method.
|
PyObject | __ior__(PyObject other)
Equivalent to the standard Python __ior__ method |
PyObject | __ipow__(PyObject other)
Equivalent to the standard Python __ipow__ method |
PyObject | __irshift__(PyObject other)
Equivalent to the standard Python __irshift__ method |
PyObject | __isub__(PyObject other)
Equivalent to the standard Python __isub__ method |
PyObject | __iternext__()
Return the next element of the sequence that this is an iterator
for. |
PyObject | __iter__()
Return an iterator that is used to iterate the element of this
sequence.
|
PyObject | __itruediv__(PyObject other)
Equivalent to the standard Python __itruediv__ method |
PyObject | __ixor__(PyObject other)
Equivalent to the standard Python __ixor__ method |
int | __len__()
Equivalent to the standard Python __len__ method.
|
PyObject | __le__(PyObject other)
Equivalent to the standard Python __le__ method.
|
PyLong | __long__()
Equivalent to the standard Python __long__ method.
|
PyObject | __lshift__(PyObject other)
Equivalent to the standard Python __lshift__ method |
PyObject | __lt__(PyObject other)
Equivalent to the standard Python __lt__ method.
|
PyObject | __mod__(PyObject other)
Equivalent to the standard Python __mod__ method |
PyObject | __mul__(PyObject other)
Equivalent to the standard Python __mul__ method |
PyObject | __neg__()
Equivalent to the standard Python __neg__ method.
|
PyObject | __ne__(PyObject other)
Equivalent to the standard Python __ne__ method.
|
boolean | __nonzero__()
Equivalent to the standard Python __nonzero__ method.
|
PyObject | __not__()
Implements boolean not
|
PyString | __oct__()
Equivalent to the standard Python __oct__ method.
|
PyObject | __or__(PyObject other)
Equivalent to the standard Python __or__ method |
PyObject | __pos__()
Equivalent to the standard Python __pos__ method.
|
PyObject | __pow__(PyObject o2, PyObject o3)
Implements the three argument power function.
|
PyObject | __pow__(PyObject other)
Equivalent to the standard Python __pow__ method |
PyObject | __radd__(PyObject other)
Equivalent to the standard Python __radd__ method |
PyObject | __rand__(PyObject other)
Equivalent to the standard Python __rand__ method |
PyObject | __rdivmod__(PyObject other)
Equivalent to the standard Python __rdivmod__ method |
PyObject | __rdiv__(PyObject other)
Equivalent to the standard Python __rdiv__ method |
PyObject | __reduce__()
Used for pickling.
|
PyString | __repr__()
Equivalent to the standard Python __repr__ method. |
PyObject | __rfloordiv__(PyObject other)
Equivalent to the standard Python __rfloordiv__ method |
PyObject | __rlshift__(PyObject other)
Equivalent to the standard Python __rlshift__ method |
PyObject | __rmod__(PyObject other)
Equivalent to the standard Python __rmod__ method |
PyObject | __rmul__(PyObject other)
Equivalent to the standard Python __rmul__ method |
PyObject | __ror__(PyObject other)
Equivalent to the standard Python __ror__ method |
PyObject | __rpow__(PyObject other)
Equivalent to the standard Python __rpow__ method |
PyObject | __rrshift__(PyObject other)
Equivalent to the standard Python __rrshift__ method |
PyObject | __rshift__(PyObject other)
Equivalent to the standard Python __rshift__ method |
PyObject | __rsub__(PyObject other)
Equivalent to the standard Python __rsub__ method |
PyObject | __rtruediv__(PyObject other)
Equivalent to the standard Python __rtruediv__ method |
PyObject | __rxor__(PyObject other)
Equivalent to the standard Python __rxor__ method |
void | __setattr__(PyString name, PyObject value)
Equivalent to the standard Python __setattr__ method.
|
void | __setattr__(String name, PyObject value)
A variant of the __setattr__ method which accepts a String
as the key. |
void | __setitem__(PyObject key, PyObject value)
Equivalent to the standard Python __setitem__ method.
|
void | __setitem__(String key, PyObject value)
A variant of the __setitem__ method which accepts a String
as the key. |
void | __setitem__(int key, PyObject value)
A variant of the __setitem__ method which accepts a primitive
int as the key.
|
void | __setslice__(PyObject s_start, PyObject s_stop, PyObject s_step, PyObject value) |
void | __setslice__(PyObject start, PyObject stop, PyObject value) |
void | __set__(PyObject obj, PyObject value) |
PyString | __str__()
Equivalent to the standard Python __str__ method. |
PyObject | __sub__(PyObject other)
Equivalent to the standard Python __sub__ method |
Object | __tojava__(Class c)
Equivalent to the Jython __tojava__ method.
|
PyObject | __truediv__(PyObject other)
Equivalent to the standard Python __truediv__ method |
PyUnicode | __unicode__() |
PyObject | __xor__(PyObject other)
Equivalent to the standard Python __xor__ method |
PyObject
. It will set
the __class__
field to correspond to the specific
subclass of PyObject
being instantiated.
a.equals(b) == true
iff cmp(a,b) == 0
Returns: internal object per instance dict or null
Returns: internal object __dict__ or null
Parameters: name the name of the method to call. This must be an interned string! args an array of the arguments to the call. keywords the keywords to use in the call.
Returns: the result of calling the method name with args and keywords.
Parameters: name the name of the method to call. This must be an interned string!
Returns: the result of calling the method name with no args
Parameters: name the name of the method to call. This must be an interned string! arg1 the one argument of the method.
Returns: the result of calling the method name with arg1
Parameters: name the name of the method to call. This must be an interned string! arg1 the first argument of the method. arg2 the second argument of the method.
Returns: the result of calling the method name with arg1 and arg2
this + o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the add.
Throws: Py.TypeError if this operation can't be performed with these operands.
this & o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the and.
Throws: Py.TypeError if this operation can't be performed with these operands.
Deprecated:
Parameters: o the object to compare this with.
Returns: -1 if this < 0; 0 if this == o; +1 if this > o
this / o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the div.
Throws: Py.TypeError if this operation can't be performed with these operands.
this divmod o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the divmod.
Throws: Py.TypeError if this operation can't be performed with these operands.
this == other
.
Parameters: o the object to compare this with.
Returns: the result of the comparison
this // o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the floordiv.
Throws: Py.TypeError if this operation can't be performed with these operands.
this >= other
.
Parameters: o the object to compare this with.
Returns: the result of the comparison
this > other
.
Parameters: o the object to compare this with.
Returns: the result of the comparison
in
operator.
Parameters: o the container to search for this element.
Returns: the result of the search.
is
operator.
Parameters: o the object to compare this with.
Returns: the result of the comparison
is not
operator.
Parameters: o the object to compare this with.
Returns: the result of the comparison
Parameters: args call arguments.
Throws: Throwable
this <= other
.
Parameters: o the object to compare this with.
Returns: the result of the comparison
this << o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the lshift.
Throws: Py.TypeError if this operation can't be performed with these operands.
this < other
.
Parameters: o the object to compare this with.
Returns: the result of the comparison
this % o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the mod.
Throws: Py.TypeError if this operation can't be performed with these operands.
this * o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the mul.
Throws: Py.TypeError if this operation can't be performed with these operands.
this != other
.
Parameters: o the object to compare this with.
Returns: the result of the comparison
not in
operator.
Parameters: o the container to search for this element.
Returns: the result of the search.
this | o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the or.
Throws: Py.TypeError if this operation can't be performed with these operands.
this ** o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the pow.
Throws: Py.TypeError if this operation can't be performed with these operands.
this >> o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the rshift.
Throws: Py.TypeError if this operation can't be performed with these operands.
this - o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the sub.
Throws: Py.TypeError if this operation can't be performed with these operands.
this / o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the truediv.
Throws: Py.TypeError if this operation can't be performed with these operands.
this ^ o2
Parameters: o2 the object to perform this binary operation with.
Returns: the result of the xor.
Throws: Py.TypeError if this operation can't be performed with these operands.
Returns: abs(this).
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the add, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the and, or null if this operation is not defined
Parameters: args all arguments to the function (including keyword arguments). keywords the keywords used for all keyword arguments.
__call__(args,
keywords)
with the appropriate arguments. The only reason to
override this function would be for improved performance.
Parameters: arg1 the first argument to the function. args the last arguments to the function (including keyword arguments). keywords the keywords used for all keyword arguments.
__call__(args, keywords)
with the appropriate arguments. The only reason to override this
function would be for improved performance.
Parameters: args all arguments to the function.
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
Parameters: arg0 the single argument to the function.
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
Parameters: arg0 the first argument to the function. arg1 the second argument to the function.
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
Parameters: arg0 the first argument to the function. arg1 the second argument to the function. arg2 the third argument to the function.
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
Parameters: arg0 the first argument to the function. arg1 the second argument to the function. arg2 the third argument to the function. arg3 the fourth argument to the function.
Parameters: other the object to compare this with.
Returns: -1 if this < 0; 0 if this == o; +1 if this > o; -2 if no comparison is implemented
Parameters: o the other object involved in the coercion
Returns: null if no coercion is possible; a single PyObject to use to replace o if this is unchanged; or a PyObject[2] consisting of replacements for this and o.
Parameters: pyo the other object involved in the coercion.
Returns: a tuple of this object and pyo coerced to the same type or Py.None if no coercion is possible.
Returns: a complex number corresponding to the value of this object.
Parameters: o the element to search for in this container.
Returns: the result of the search.
Parameters: name the name to which will be removed
Throws: Py.AttributeError if the name doesn't exist
__delattr__(PyString name)
with the appropriate args.
The only reason to override this method is for performance.
Parameters: name the name which will be removed - must be an interned string .
Throws: Py.AttributeError if the name doesn't exist
Parameters: key the key to be removed from the container
Throws: Py.KeyError if the key is not found in the container
__delitem__(PyObject key)
with the appropriate args.
The only reason to override this method is for performance.
Parameters: key the key who will be removed - must be an interned string .
Throws: Py.KeyError if the key is not found in the container
Returns: a list of names defined by this object.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the divmod, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the div, or null if this operation is not defined
Parameters: other the object to compare this with.
Returns: the result of the comparison.
__findattr__(name.internedString)
with the appropriate
args.
Classes that wish to implement __getattr__ should override this method
instead (with the appropriate semantics.
Parameters: name the name to lookup in this namespace
Returns: the value corresponding to name or null if name is not found
String
as the name.
Warning: name must be an interned string!
Parameters: name the name to lookup in this namespace must be an interned string .
Returns: the value corresponding to name or null if name is not found
Parameters: key the key to lookup in this container
Returns: the value corresponding to key or null if key is not found
int
as the key. By default, this method will call
__finditem__(PyObject key)
with the appropriate args.
The only reason to override this method is for performance.
Parameters: key the key to lookup in this sequence.
Returns: the value corresponding to key or null if key is not found.
String
as the key. By default, this method will call
__finditem__(PyObject key)
with the appropriate args.
The only reason to override this method is for performance.
Warning: key must be an interned string!!!!!!!!
Parameters: key the key to lookup in this sequence - must be an interned string .
Returns: the value corresponding to key or null if key is not found.
Returns: a float corresponding to the value of this object.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the floordiv, or null if this operation is not defined
__findattr__
method instead.
Parameters: name the name to lookup in this namespace
Returns: the value corresponding to name
Throws: Py.AttributeError if the name is not found.
String
as the name.
This method can not be overridden.
Override the __findattr__
method instead.
Warning: name must be an interned string!!!!!!!!
Parameters: name the name to lookup in this namespace must be an interned string .
Returns: the value corresponding to name
Throws: Py.AttributeError if the name is not found.
int
as the key.
This method should not be overridden.
Override the __finditem__
method instead.
Parameters: key the key to lookup in this container.
Returns: the value corresponding to that key.
Throws: Py.KeyError if the key is not found.
__finditem__
method instead.
Parameters: key the key to lookup in this container.
Returns: the value corresponding to that key.
Throws: Py.KeyError if the key is not found.
Parameters: other the object to compare this with.
Returns: the result of the comparison.
Parameters: other the object to compare this with.
Returns: the result of the comparison.
hashCode
method to return an appropriate hash code for
the PyObject
.
Returns: a string representing this object as a hexadecimal number.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the add, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the and, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the divmod, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the div, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the floordiv, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the lshift, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the mod, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the mul, or null if this operation is not defined
Returns: an integer corresponding to the value of this object.
Returns: ~this.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the or, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the pow, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the rshift, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the sub, or null if this operation is not defined
Since: 2.2
If a PyObject subclass should support iteration based in the __finditem__() method, it must supply an implementation of __iter__() like this:
public PyObject __iter__() { return new PySequenceIter(this); }When iterating over a python sequence from java code, it should be done with code like this:
PyObject iter = seq.__iter__(); for (PyObject item; (item = iter.__iternext__()) != null;) { // Do somting with item }
Since: 2.2
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the truediv, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the xor, or null if this operation is not defined
Returns: the length of the object
Parameters: other the object to compare this with.
Returns: the result of the comparison.
Returns: a PyLong corresponding to the value of this object.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the lshift, or null if this operation is not defined
Parameters: other the object to compare this with.
Returns: the result of the comparison.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the mod, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the mul, or null if this operation is not defined
Returns: -this.
Parameters: other the object to compare this with.
Returns: the result of the comparison.
PyObject
is
considered true.
Returns: not this.
Returns: a string representing this object as an octal number.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the or, or null if this operation is not defined
Returns: +this.
Parameters: o2 the power to raise this number to. o3 the modulus to perform this operation in or null if no modulo is to be used
Returns: this object raised to the given power in the given modulus
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the pow, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the add, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the and, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the divmod, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the div, or null if this operation is not defined.
Returns: a tuple of (class, tuple)
PyObject
is to
override the standard Java toString
method.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the floordiv, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the lshift, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the mod, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the mul, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the or, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the pow, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the rshift, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the rshift, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the sub, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the truediv, or null if this operation is not defined.
Parameters: other the object to perform this binary operation with (the left-hand operand).
Returns: the result of the xor, or null if this operation is not defined.
Parameters: name the name to lookup in this namespace
Throws: Py.AttributeError if the name is not found.
Parameters: name the name whose value will be set - must be an interned string . value the value to set this name to
Parameters: key the key whose value will be set value the value to set this key to
__setitem__(PyObject key, PyObject value)
with the appropriate args.
The only reason to override this method is for performance.
Parameters: key the key whose value will be set - must be an interned string . value the value to set this key to
int
as the key.
By default, this will call
__setitem__(PyObject key, PyObject value)
with the appropriate args.
The only reason to override this method is for performance.
Parameters: key the key whose value will be set value the value to set this key to
PyObject
is to
override the standard Java toString
method.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the sub, or null if this operation is not defined
Py.NoConversion
if this PyObject
can not be converted to the
desired Java class.
Parameters: c the Class to convert this PyObject
to.
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the truediv, or null if this operation is not defined
Parameters: other the object to perform this binary operation with (the right-hand operand).
Returns: the result of the xor, or null if this operation is not defined