All objects known to the Jython runtime system are represented
by an instance of the class PyObject
or one of
its subclasses.
__abs__
public PyObject __abs__()
Equivalent to the standard Python __abs__ method.
__add__
public PyObject __add__(PyObject other)
Equivalent to the standard Python __add__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the add, or null if this operation
is not defined
__and__
public PyObject __and__(PyObject other)
Equivalent to the standard Python __and__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the and, or null if this operation
is not defined
__call__
public PyObject __call__()
A variant of the __call__ method with no arguments. The default
behavior is to invoke __call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__
public PyObject __call__(args[] )
A variant of the __call__ method when no keywords are passed. The
default behavior is to invoke __call__(args, keywords)
with the appropriate arguments. The only reason to override this
function would be for improved performance.
__call__
public PyObject __call__(args[] ,
keywords[] )
The basic method to override when implementing a callable object.
The first len(args)-len(keywords) members of args[] are plain
arguments. The last len(keywords) arguments are the values of the
keyword arguments.
__call__
public PyObject __call__(PyObject arg0)
A variant of the __call__ method with one argument. The default
behavior is to invoke __call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
arg0
- the single argument to the function.
__call__
public PyObject __call__(PyObject arg1,
args[] ,
keywords[] )
A variant of the __call__ method with one extra initial argument.
This variant is used to allow method invocations to be performed
efficiently.
The default behavior is to invoke __call__(args,
keywords)
with the appropriate arguments. The only reason to
override this function would be for improved performance.
arg1
- the first argument to the function.
__call__
public PyObject __call__(PyObject arg0,
PyObject arg1)
A variant of the __call__ method with two arguments. The default
behavior is to invoke __call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
arg0
- the first argument to the function.arg1
- the second argument to the function.
__call__
public PyObject __call__(PyObject arg0,
PyObject arg1,
PyObject arg2)
A variant of the __call__ method with three arguments. The default
behavior is to invoke __call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
arg0
- the first argument to the function.arg1
- the second argument to the function.arg2
- the third argument to the function.
__call__
public PyObject __call__(PyObject arg0,
PyObject arg1,
PyObject arg2,
PyObject arg3)
A variant of the __call__ method with four arguments. The default
behavior is to invoke __call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
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.
__cmp__
public int __cmp__(PyObject other)
Equivalent to the standard Python __cmp__ method.
other
- the object to compare this with.
- -1 if this <320; 0 if this == o; +1 if this > o; -2 if no
comparison is implemented
__coerce__
public final PyObject __coerce__(PyObject pyo)
Equivalent to the standard Python __coerce__ method.
This method can not be overridden.
To implement __coerce__ functionality, override __coerce_ex__ instead.
pyo
- the other object involved in the coercion.
- a tuple of this object and pyo coerced to the same type
or Py.None if no coercion is possible.
__coerce_ex__
public Object __coerce_ex__(PyObject o)
Implements numeric coercion
o
- the other object involved in the coercion
- 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.
__complex__
public PyComplex __complex__()
Equivalent to the standard Python __complex__ method.
Should only be overridden by numeric objects that can be
reasonably coerced into a python complex number.
- a complex number corresponding to the value of this object.
__contains__
public boolean __contains__(PyObject o)
Equivalent to the standard Python __contains__ method.
o
- the element to search for in this container.
- the result of the search.
__delattr__
public void __delattr__(String name)
A variant of the __delattr__ method which accepts a String
as the key. This String must be interned.
By default, this will call
__delattr__(PyString name)
with the appropriate args.
The only reason to override this method is for performance.
name
- the name which will be removed -
must be an interned string .
__delattr__
public final void __delattr__(PyString name)
Equivalent to the standard Python __delattr__ method.
This method can not be overridden.
name
- the name to which will be removed
__delattr__(java.lang.String)
__delete__
public void __delete__(PyObject obj)
__delitem__
public void __delitem__(String key)
A variant of the __delitem__ method which accepts a String
as the key. This String must be interned.
By default, this will call
__delitem__(PyObject key)
with the appropriate args.
The only reason to override this method is for performance.
key
- the key who will be removed -
must be an interned string .
__delitem__
public void __delitem__(PyObject key)
Equivalent to the standard Python __delitem__ method.
key
- the key to be removed from the container
__dir__
public PyObject __dir__()
Equivalent to the standard Python __dir__ method.
- a list of names defined by this object.
__div__
public PyObject __div__(PyObject other)
Equivalent to the standard Python __div__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the div, or null if this operation
is not defined
__divmod__
public PyObject __divmod__(PyObject other)
Equivalent to the standard Python __divmod__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the divmod, or null if this operation
is not defined
__eq__
public PyObject __eq__(PyObject other)
Equivalent to the standard Python __eq__ method.
other
- the object to compare this with.
- the result of the comparison.
__findattr__
public PyObject __findattr__(String name)
A variant of the __findattr__ method which accepts a Java
String
as the name.
Warning: name must be an interned string!
name
- the name to lookup in this namespace
must be an interned string .
- the value corresponding to name or null if name is not found
__findattr__
public final PyObject __findattr__(PyString name)
Very similar to the standard Python __getattr__ method. Instead of
throwing a AttributeError if the item isn't found, this just returns
null.
By default, this method will call
__findattr__(name.internedString)
with the appropriate
args.
Classes that wish to implement __getattr__ should override this method
instead (with the appropriate semantics.
name
- the name to lookup in this namespace
- the value corresponding to name or null if name is not found
__finditem__
public PyObject __finditem__(String key)
A variant of the __finditem__ method which accepts a Java
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!!!!!!!!
key
- the key to lookup in this sequence -
must be an interned string .
- the value corresponding to key or null if key is not found.
__finditem__
public PyObject __finditem__(int key)
A variant of the __finditem__ method which accepts a primitive
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.
key
- the key to lookup in this sequence.
- the value corresponding to key or null if key is not found.
__finditem__
public PyObject __finditem__(PyObject key)
Very similar to the standard Python __getitem__ method.
Instead of throwing a KeyError if the item isn't found,
this just returns null.
Classes that wish to implement __getitem__ should
override this method instead (with the appropriate
semantics.
key
- the key to lookup in this container
- the value corresponding to key or null if key is not found
__float__
public PyFloat __float__()
Equivalent to the standard Python __float__ method.
Should only be overridden by numeric objects that can be
reasonably coerced into a python float.
- a float corresponding to the value of this object.
__floordiv__
public PyObject __floordiv__(PyObject other)
Equivalent to the standard Python __floordiv__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the floordiv, or null if this operation
is not defined
__ge__
public PyObject __ge__(PyObject other)
Equivalent to the standard Python __ge__ method.
other
- the object to compare this with.
- the result of the comparison.
__getattr__
public final PyObject __getattr__(String name)
A variant of the __getattr__ method which accepts a Java
String
as the name.
This method can not be overridden.
Override the __findattr__
method instead.
Warning: name must be an interned string!!!!!!!!
name
- the name to lookup in this namespace
must be an interned string .
- the value corresponding to name
__findattr__(java.lang.String)
__getattr__
public final PyObject __getattr__(PyString name)
Equivalent to the standard Python __getattr__ method.
This method can not be overridden.
Override the __findattr__
method instead.
name
- the name to lookup in this namespace
- the value corresponding to name
__getitem__
public PyObject __getitem__(int key)
Equivalent to the standard Python __getitem__ method.
This variant takes a primitive int
as the key.
This method should not be overridden.
Override the __finditem__
method instead.
key
- the key to lookup in this container.
- the value corresponding to that key.
__getitem__
public PyObject __getitem__(PyObject key)
Equivalent to the standard Python __getitem__ method.
This method should not be overridden.
Override the __finditem__
method instead.
key
- the key to lookup in this container.
- the value corresponding to that key.
__getnewargs__
public PyTuple __getnewargs__()
__gt__
public PyObject __gt__(PyObject other)
Equivalent to the standard Python __gt__ method.
other
- the object to compare this with.
- the result of the comparison.
__hash__
public final PyInteger __hash__()
Equivalent to the standard Python __hash__ method. This method can
not be overridden. Instead, you should override the standard Java
hashCode
method to return an appropriate hash code for
the PyObject
.
__hex__
public 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.
- a string representing this object as a hexadecimal number.
__iadd__
public PyObject __iadd__(PyObject other)
Equivalent to the standard Python __iadd__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the add, or null if this operation
is not defined
__iand__
public PyObject __iand__(PyObject other)
Equivalent to the standard Python __iand__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the and, or null if this operation
is not defined
__idiv__
public PyObject __idiv__(PyObject other)
Equivalent to the standard Python __idiv__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the div, or null if this operation
is not defined
__idivmod__
public PyObject __idivmod__(PyObject other)
Equivalent to the standard Python __idivmod__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the divmod, or null if this operation
is not defined
__ifloordiv__
public PyObject __ifloordiv__(PyObject other)
Equivalent to the standard Python __ifloordiv__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the floordiv, or null if this operation
is not defined
__ilshift__
public PyObject __ilshift__(PyObject other)
Equivalent to the standard Python __ilshift__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the lshift, or null if this operation
is not defined
__imod__
public PyObject __imod__(PyObject other)
Equivalent to the standard Python __imod__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the mod, or null if this operation
is not defined
__imul__
public PyObject __imul__(PyObject other)
Equivalent to the standard Python __imul__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the mul, or null if this operation
is not defined
__int__
public PyObject __int__()
Equivalent to the standard Python __int__ method.
Should only be overridden by numeric objects that can be
reasonably coerced into an integer.
- an integer corresponding to the value of this object.
__invert__
public PyObject __invert__()
Equivalent to the standard Python __invert__ method.
__ior__
public PyObject __ior__(PyObject other)
Equivalent to the standard Python __ior__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the or, or null if this operation
is not defined
__ipow__
public PyObject __ipow__(PyObject other)
Equivalent to the standard Python __ipow__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the pow, or null if this operation
is not defined
__irshift__
public PyObject __irshift__(PyObject other)
Equivalent to the standard Python __irshift__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the rshift, or null if this operation
is not defined
__isub__
public PyObject __isub__(PyObject other)
Equivalent to the standard Python __isub__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the sub, or null if this operation
is not defined
__iter__
public PyObject __iter__()
Return an iterator that is used to iterate the element of this
sequence.
From version 2.2, this method is the primary protocol for looping
over sequences.
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.__next__()) != null; {
// Do somting with item
}
__iternext__
public PyObject __iternext__()
Return the next element of the sequence that this is an iterator
for. Returns null when the end of the sequence is reached.
__itruediv__
public PyObject __itruediv__(PyObject other)
Equivalent to the standard Python __itruediv__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the truediv, or null if this operation
is not defined
__ixor__
public PyObject __ixor__(PyObject other)
Equivalent to the standard Python __ixor__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the xor, or null if this operation
is not defined
__le__
public PyObject __le__(PyObject other)
Equivalent to the standard Python __le__ method.
other
- the object to compare this with.
- the result of the comparison.
__len__
public int __len__()
Equivalent to the standard Python __len__ method.
Part of the mapping discipline.
__long__
public PyLong __long__()
Equivalent to the standard Python __long__ method.
Should only be overridden by numeric objects that can be
reasonably coerced into a python long.
- a PyLong corresponding to the value of this object.
__lshift__
public PyObject __lshift__(PyObject other)
Equivalent to the standard Python __lshift__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the lshift, or null if this operation
is not defined
__lt__
public PyObject __lt__(PyObject other)
Equivalent to the standard Python __lt__ method.
other
- the object to compare this with.
- the result of the comparison.
__mod__
public PyObject __mod__(PyObject other)
Equivalent to the standard Python __mod__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the mod, or null if this operation
is not defined
__mul__
public PyObject __mul__(PyObject other)
Equivalent to the standard Python __mul__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the mul, or null if this operation
is not defined
__ne__
public PyObject __ne__(PyObject other)
Equivalent to the standard Python __ne__ method.
other
- the object to compare this with.
- the result of the comparison.
__neg__
public PyObject __neg__()
Equivalent to the standard Python __neg__ method.
__nonzero__
public boolean __nonzero__()
Equivalent to the standard Python __nonzero__ method.
Returns whether of not a given PyObject
is
considered true.
__not__
public PyObject __not__()
Implements boolean not
__oct__
public PyString __oct__()
Equivalent to the standard Python __oct__ method.
Should only be overridden by numeric objects that can be
reasonably represented as an octal string.
- a string representing this object as an octal number.
__or__
public PyObject __or__(PyObject other)
Equivalent to the standard Python __or__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the or, or null if this operation
is not defined
__pos__
public PyObject __pos__()
Equivalent to the standard Python __pos__ method.
__pow__
public PyObject __pow__(PyObject other)
Equivalent to the standard Python __pow__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the pow, or null if this operation
is not defined
__pow__
public PyObject __pow__(PyObject o2,
PyObject o3)
Implements the three argument power function.
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
- this object raised to the given power in the given modulus
__radd__
public PyObject __radd__(PyObject other)
Equivalent to the standard Python __radd__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the add, or null if this operation
is not defined.
__rand__
public PyObject __rand__(PyObject other)
Equivalent to the standard Python __rand__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the and, or null if this operation
is not defined.
__rdiv__
public PyObject __rdiv__(PyObject other)
Equivalent to the standard Python __rdiv__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the div, or null if this operation
is not defined.
__rdivmod__
public PyObject __rdivmod__(PyObject other)
Equivalent to the standard Python __rdivmod__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the divmod, or null if this operation
is not defined.
__reduce__
public PyObject __reduce__()
Used for pickling.
- a tuple of (class, tuple)
__repr__
public PyString __repr__()
Equivalent to the standard Python __repr__ method. This method
should not typically need to be overrriden. The easiest way to
configure the string representation of a PyObject
is to
override the standard Java toString
method.
__rfloordiv__
public PyObject __rfloordiv__(PyObject other)
Equivalent to the standard Python __rfloordiv__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the floordiv, or null if this operation
is not defined.
__rlshift__
public PyObject __rlshift__(PyObject other)
Equivalent to the standard Python __rlshift__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the lshift, or null if this operation
is not defined.
__rmod__
public PyObject __rmod__(PyObject other)
Equivalent to the standard Python __rmod__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the mod, or null if this operation
is not defined.
__rmul__
public PyObject __rmul__(PyObject other)
Equivalent to the standard Python __rmul__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the mul, or null if this operation
is not defined.
__ror__
public PyObject __ror__(PyObject other)
Equivalent to the standard Python __ror__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the or, or null if this operation
is not defined.
__rpow__
public PyObject __rpow__(PyObject other)
Equivalent to the standard Python __rpow__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the pow, or null if this operation
is not defined.
__rrshift__
public PyObject __rrshift__(PyObject other)
Equivalent to the standard Python __rrshift__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the rshift, or null if this operation
is not defined.
__rshift__
public PyObject __rshift__(PyObject other)
Equivalent to the standard Python __rshift__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the rshift, or null if this operation
is not defined
__rsub__
public PyObject __rsub__(PyObject other)
Equivalent to the standard Python __rsub__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the sub, or null if this operation
is not defined.
__rtruediv__
public PyObject __rtruediv__(PyObject other)
Equivalent to the standard Python __rtruediv__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the truediv, or null if this operation
is not defined.
__rxor__
public PyObject __rxor__(PyObject other)
Equivalent to the standard Python __rxor__ method
other
- the object to perform this binary operation with
(the left-hand operand).
- the result of the xor, or null if this operation
is not defined.
__setattr__
public void __setattr__(String name,
PyObject value)
A variant of the __setattr__ method which accepts a String
as the key. This String must be interned.
name
- the name whose value will be set -
must be an interned string .value
- the value to set this name to
__setattr__
public final void __setattr__(PyString name,
PyObject value)
Equivalent to the standard Python __setattr__ method.
This method can not be overridden.
name
- the name to lookup in this namespace
__setattr__(java.lang.String, PyObject)
__setitem__
public void __setitem__(String key,
PyObject value)
A variant of the __setitem__ method which accepts a String
as the key. This String must be interned.
By default, this will call
__setitem__(PyObject key, PyObject value)
with the appropriate args.
The only reason to override this method is for performance.
key
- the key whose value will be set -
must be an interned string .value
- the value to set this key to
__setitem__
public void __setitem__(int key,
PyObject value)
A variant of the __setitem__ method which accepts a primitive
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.
key
- the key whose value will be setvalue
- the value to set this key to
__setitem__
public void __setitem__(PyObject key,
PyObject value)
Equivalent to the standard Python __setitem__ method.
key
- the key whose value will be setvalue
- the value to set this key to
__str__
public PyString __str__()
Equivalent to the standard Python __str__ method. This method
should not typically need to be overridden. The easiest way to
configure the string representation of a PyObject
is to
override the standard Java toString
method.
__sub__
public PyObject __sub__(PyObject other)
Equivalent to the standard Python __sub__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the sub, or null if this operation
is not defined
__tojava__
public Object __tojava__(Class c)
Equivalent to the Jython __tojava__ method.
Tries to coerce this object to an instance of the requested Java class.
Returns the special object Py.NoConversion
if this PyObject
can not be converted to the
desired Java class.
c
- the Class to convert this PyObject
to.
__truediv__
public PyObject __truediv__(PyObject other)
Equivalent to the standard Python __truediv__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the truediv, or null if this operation
is not defined
__xor__
public PyObject __xor__(PyObject other)
Equivalent to the standard Python __xor__ method
other
- the object to perform this binary operation with
(the right-hand operand).
- the result of the xor, or null if this operation
is not defined
_add
public final PyObject _add(PyObject o2)
Implements the Python expression this + o2
o2
- the object to perform this binary operation with.
_and
public final PyObject _and(PyObject o2)
Implements the Python expression this & o2
o2
- the object to perform this binary operation with.
_cmp
public final int _cmp(PyObject o)
Implements cmp(this, other)
o
- the object to compare this with.
- -1 if this <320; 0 if this == o; +1 if this > o
_div
public final PyObject _div(PyObject o2)
Implements the Python expression this / o2
o2
- the object to perform this binary operation with.
_divmod
public final PyObject _divmod(PyObject o2)
Implements the Python expression this divmod o2
o2
- the object to perform this binary operation with.
- the result of the divmod.
_eq
public final PyObject _eq(PyObject o)
Implements the Python expression this == other
.
o
- the object to compare this with.
- the result of the comparison
_floordiv
public final PyObject _floordiv(PyObject o2)
Implements the Python expression this // o2
o2
- the object to perform this binary operation with.
- the result of the floordiv.
_ge
public final PyObject _ge(PyObject o)
Implements the Python expression this >= other
.
o
- the object to compare this with.
- the result of the comparison
_gt
public final PyObject _gt(PyObject o)
Implements the Python expression this > other
.
o
- the object to compare this with.
- the result of the comparison
_in
public final PyObject _in(PyObject o)
Implements in
operator.
o
- the container to search for this element.
- the result of the search.
_is
public PyObject _is(PyObject o)
Implements is
operator.
o
- the object to compare this with.
- the result of the comparison
_isnot
public PyObject _isnot(PyObject o)
Implements is not
operator.
o
- the object to compare this with.
- the result of the comparison
_jcall
public PyObject _jcall(Object[] args)
_jcallexc
public PyObject _jcallexc(Object[] args)
throws Throwable
A convenience function for PyProxy's.
_jthrow
public void _jthrow(Throwable t)
_le
public final PyObject _le(PyObject o)
Implements the Python expression this <= other
.
o
- the object to compare this with.
- the result of the comparison
_lshift
public final PyObject _lshift(PyObject o2)
Implements the Python expression this << o2
o2
- the object to perform this binary operation with.
- the result of the lshift.
_lt
public final PyObject _lt(PyObject o)
Implements the Python expression this < other
.
o
- the object to compare this with.
- the result of the comparison
_mod
public final PyObject _mod(PyObject o2)
Implements the Python expression this % o2
o2
- the object to perform this binary operation with.
_mul
public final PyObject _mul(PyObject o2)
Implements the Python expression this * o2
o2
- the object to perform this binary operation with.
_ne
public final PyObject _ne(PyObject o)
Implements the Python expression this != other
.
o
- the object to compare this with.
- the result of the comparison
_notin
public final PyObject _notin(PyObject o)
Implements not in
operator.
o
- the container to search for this element.
- the result of the search.
_or
public final PyObject _or(PyObject o2)
Implements the Python expression this | o2
o2
- the object to perform this binary operation with.
_pow
public final PyObject _pow(PyObject o2)
Implements the Python expression this ** o2
o2
- the object to perform this binary operation with.
_rshift
public final PyObject _rshift(PyObject o2)
Implements the Python expression this >> o2
o2
- the object to perform this binary operation with.
- the result of the rshift.
_sub
public final PyObject _sub(PyObject o2)
Implements the Python expression this - o2
o2
- the object to perform this binary operation with.
_truediv
public final PyObject _truediv(PyObject o2)
Implements the Python expression this / o2
o2
- the object to perform this binary operation with.
- the result of the truediv.
_xor
public final PyObject _xor(PyObject o2)
Implements the Python expression this ^ o2
o2
- the object to perform this binary operation with.
delDict
public void delDict()
delType
public void delType()
dispatch__init__
public void dispatch__init__(PyType type,
PyObject[] args,
String[] keywords)
Dispatch __init__ behavior
equals
public boolean equals(Object ob_other)
Should almost never be overridden.
If overridden, it is the subclasses responsibility to ensure that
a.equals(b) == true
iff cmp(a,b) == 0
fastGetClass
public PyObject fastGetClass()
fastGetDict
public PyObject fastGetDict()
xxx implements where meaningful
- internal object per instance dict or null
getDict
public PyObject getDict()
xxx implements where meaningful
- internal object __dict__ or null
getType
public PyType getType()
hashCode
public int hashCode()
implementsDescrDelete
public boolean implementsDescrDelete()
implementsDescrSet
public boolean implementsDescrSet()
invoke
public PyObject invoke(String name)
Shortcut for calling a method on a PyObject with no args.
name
- the name of the method to call. This must be an
interned string!
- the result of calling the method name with no args
invoke
public PyObject invoke(String name,
PyObject arg1)
Shortcut for calling a method on a PyObject with one arg.
name
- the name of the method to call. This must be an
interned string!arg1
- the one argument of the method.
- the result of calling the method name with arg1
invoke
public PyObject invoke(String name,
PyObject arg1,
PyObject arg2)
Shortcut for calling a method on a PyObject with two args.
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.
- the result of calling the method name with arg1 and arg2
invoke
public PyObject invoke(String name,
PyObject[] args,
String[] keywords)
Shortcut for calling a method on a PyObject from Java.
This form is equivalent to o.__getattr__(name).__call__(args, keywords)
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.
- the result of calling the method name with args and keywords.
isCallable
public boolean isCallable()
isDataDescr
public boolean isDataDescr()
isMappingType
public boolean isMappingType()
isNumberType
public boolean isNumberType()
isSequenceType
public boolean isSequenceType()
noAttributeError
public void noAttributeError(String name)
readonlyAttributeError
public void readonlyAttributeError(String name)
setDict
public void setDict(PyObject newDict)
setType
public void setType(PyType type)
toString
public String toString()