Top Description Inners Fields Constructors Methods
org.python.core

public Class PyObject

Additional top-level class in compilation unit: PyIdentityTuple.

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
org.python.core.PyIdentityTuple, org.python.core.PyObjectDerived, org.python.core.PyProperty, org.python.core.PyReflectedField, org.python.core.PySequence, org.python.core.PySingleton, org.python.core.PySlice, org.python.core.PyStaticMethod, org.python.core.PySystemState, org.python.core.PyAttributeDeleted, org.python.core.PyTraceback, org.python.core.PyType, org.python.core.stringlib.FieldNameIterator, org.python.core.stringlib.MarkupIterator, org.python.core.util.importer, org.python.jsr223.PyScriptEngineScope, org.python.modules.operator, org.python.modules.operator.PyAttrGetter, org.python.modules.operator.PyItemGetter, org.python.modules.operator.PyMethodCaller, org.python.modules.PyStruct, org.python.modules.synchronize.SynchronizedCallable, org.python.modules._codecs.EncodingMap, org.python.modules._hashlib.Hash, org.python.modules._marshal.Marshaller, org.python.modules._marshal.Unmarshaller, org.python.modules.thread.PyLocal, org.python.modules.thread.PyLock, org.python.modules.bz2.PyBZ2Compressor, org.python.modules.bz2.PyBZ2Decompressor, org.python.modules.bz2.PyBZ2File, org.python.modules.jffi.BasePointer, org.python.modules.jffi.ByReference, org.python.modules.jffi.CData, org.python.modules.jffi.CType, org.python.modules.jffi.DynamicLibrary, org.python.modules.jffi.StructLayout.Field, org.python.modules.random.PyRandom, org.python.modules.sre.MatchObject, org.python.modules.sre.PatternObject, org.python.modules.sre.ScannerObject, org.python.modules._collections.PyDeque, org.python.modules._csv.PyDialect, org.python.modules._csv.PyWriter, org.python.modules._functools.PyPartial, org.python.modules._io.PyIOBase, org.python.modules._json.Encoder, org.python.modules._json.Scanner, org.python.modules._jythonlib.dict_builder, org.python.modules._jythonlib.set_builder, org.python.modules._threading.Condition, org.python.modules._threading.Lock, org.python.modules._threading.RLock, org.python.modules._weakref.AbstractReference, com.ziclix.python.sql.PyConnection, com.ziclix.python.sql.PyCursor, com.ziclix.python.sql.PyStatement, com.ziclix.python.sql.zxJDBC, com.ziclix.python.sql.connect.Connect, com.ziclix.python.sql.connect.Connectx, com.ziclix.python.sql.connect.Lookup, com.ziclix.python.sql.util.BCP, org.python.antlr.AST, org.python.core.AbstractDict, org.python.core.BaseDictionaryView, org.python.core.BaseSet, org.python.core.ContextGuard.GeneratorContextManager, org.python.core.exceptions, org.python.core.PyBaseException, org.python.core.PyBeanEvent, org.python.core.PyBeanEventProperty, org.python.core.PyBuiltinCallable, org.python.core.JavaImporter, org.python.core.JavaFunc, org.python.core.PyCompoundCallable, org.python.core.PyReflectedFunction, org.python.core.PySuper, org.python.core.PyBytecode.PyStackWhy, org.python.core.PyBytecode.PyStackException, org.python.core.PyBytecode.PyTryBlock, org.python.core.PyCell, org.python.core.PyClass, org.python.core.PyClassMethod, org.python.core.PyCode, org.python.core.PyComplex, org.python.core.PyDescriptor, org.python.core.PyDictProxy, org.python.core.PyFile, org.python.core.PyFileReader, org.python.core.PyFileWriter, org.python.core.PyFloat, org.python.core.PyFrame, org.python.core.PyFunction, org.python.core.PyInstance, org.python.core.PyInteger, org.python.core.PyIterator, org.python.core.PyJavaPackage, org.python.core.PyLong, org.python.core.PyMethod, org.python.core.PyModule, org.python.core.PyNone, org.python.core.PyNullImporter
Annotations
@ExposedType
name:object
doc:The most base type
Imports
java.io.Serializable, java.text.MessageFormat, java.util.ArrayList, .Iterator, .List, .Map, org.python.expose.ExposedClassMethod, .ExposedDelete, .ExposedGet, .ExposedMethod, .ExposedNew, .ExposedSet, .ExposedType, org.python.modules.gc, org.python.util.Generic

All objects known to the Jython runtime system are represented by an instance of the class PyObject or one of its subclasses.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
protected Object
attributes

attributes is a general purpose linked list of arbitrary Java objects that should be kept alive by this PyObject.

public static boolean
gcMonitorGlobal

This should have been suited at org.python.modules.gc, but that would cause a dependency cycle in the init-phases of gc.class and PyObject.class.

protected PyType
objtype

The type of this object.

private static final Map<Class<?>, Class<?>>
primitiveMap

Primitives classes their wrapper classes.

public static final PyType

Constructor Summary

AccessConstructor and Description
public
PyObject(PyType objtype)

public
PyObject()

The standard constructor for a PyObject.

pack-priv
PyObject(boolean ignored)

Creates the PyObject for the base type.

Method Summary

Modifier and TypeMethod and Description
public PyObject

Returns:

abs(this).
__abs__
()

Equivalent to the standard Python __abs__ method.

public PyObject

Returns:

the result of the add, or null if this operation is not defined.
__add__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __add__ method.

public PyObject

Returns:

the result of the and, or null if this operation is not defined
__and__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __and__ method

public PyObject
__call__(PyObject[]
all arguments to the function (including keyword arguments).
args
,
String[]
the keywords used for all keyword arguments.
keywords
)

The basic method to override when implementing a callable object.

public PyObject
__call__(ThreadState state, PyObject[] args, String[] keywords)

public PyObject
__call__(PyObject
the first argument to the function.
arg1
,
PyObject[]
the last arguments to the function (including keyword arguments).
args
,
String[]
the keywords used for all keyword arguments.
keywords
)

A variant of the __call__ method with one extra initial argument.

public PyObject
__call__(ThreadState state, PyObject arg1, PyObject[] args, String[] keywords)

public PyObject
__call__(PyObject[]
all arguments to the function.
args
)

A variant of the __call__ method when no keywords are passed.

public PyObject
__call__(ThreadState state, PyObject[] args)

public PyObject
__call__()

A variant of the __call__ method with no arguments.

public PyObject
public PyObject
__call__(PyObject
the single argument to the function.
arg0
)

A variant of the __call__ method with one argument.

public PyObject
public PyObject
__call__(PyObject
the first argument to the function.
arg0
,
PyObject
the second argument to the function.
arg1
)

A variant of the __call__ method with two arguments.

public PyObject
public PyObject
__call__(PyObject
the first argument to the function.
arg0
,
PyObject
the second argument to the function.
arg1
,
PyObject
the third argument to the function.
arg2
)

A variant of the __call__ method with three arguments.

public PyObject
__call__(ThreadState state, PyObject arg0, PyObject arg1, PyObject arg2)

public PyObject
__call__(PyObject
the first argument to the function.
arg0
,
PyObject
the second argument to the function.
arg1
,
PyObject
the third argument to the function.
arg2
,
PyObject
the fourth argument to the function.
arg3
)

A variant of the __call__ method with four arguments.

public PyObject
__call__(ThreadState state, PyObject arg0, PyObject arg1, PyObject arg2, PyObject arg3)

public int

Returns:

-1 if this<o; 0 if this==o; +1 if this>o; -2 if no comparison is implemented
__cmp__
(PyObject
the object to compare this with.
other
)

Equivalent to the standard Python __cmp__ method.

public final PyObject

Returns:

a tuple of this object and pyo coerced to the same type or Py.NotImplemented if no coercion is possible.
__coerce__
(PyObject
the other object involved in the coercion.
pyo
)

Equivalent to the standard Python __coerce__ method.

public Object

Returns:

null if coercion is not implemented Py.None if coercion was not possible a single PyObject to use to replace o if this is unchanged; or a PyObject[2] consisting of replacements for this and o.
__coerce_ex__
(PyObject
the other object involved in the coercion
o
)

Implements numeric coercion

public PyComplex

Returns:

a complex number corresponding to the value of this object.
__complex__
()

Equivalent to the standard Python __complex__ method.

public boolean

Returns:

the result of the search.
__contains__
(PyObject
the element to search for in this container.
o
)

Equivalent to the standard Python __contains__ method.

public final void
__delattr__(PyString
the name to which will be removed
name
)

Equivalent to the standard Python __delattr__ method.

public void
__delattr__(String
the name which will be removed - must be an interned string .
name
)

A variant of the __delattr__ method which accepts a String as the key.

public void
public void
__delitem__(PyObject
the key to be removed from the container
key
)

Equivalent to the standard Python __delitem__ method.

public void
__delitem__(String
the key who will be removed - must be an interned string .
key
)

A variant of the __delitem__ method which accepts a String as the key.

public void
__delslice__(PyObject s_start, PyObject s_stop, PyObject s_step)

public void
public PyObject

Returns:

a list of names defined by this object.
__dir__
()

Equivalent to the standard Python __dir__ method.

public PyObject

Returns:

the result of the div, or null if this operation is not defined
__div__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __div__ method

public PyObject

Returns:

the result of the divmod, or null if this operation is not defined
__divmod__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __divmod__ method

public void
__ensure_finalizer__()

PyObjects that implement org.python.core.finalization.HasFinalizeTrigger shall implement this method via: FinalizeTrigger.ensureFinalizer(this);

public PyObject

Returns:

the result of the comparison.
__eq__
(PyObject
the object to compare this with.
other
)

Equivalent to the standard Python __eq__ method.

public final PyObject

Returns:

the value corresponding to name or null if name is not found
__findattr__
(PyString
the name to lookup in this namespace
name
)

Very similar to the standard Python __getattr__ method.

public final PyObject

Returns:

the value corresponding to name or null if name is not found
__findattr__
(String
the name to lookup in this namespace must be an interned string.
name
)

A variant of the __findattr__ method which accepts a Java String as the name.

public PyObject

Returns:

The looked up value. May return null if the attribute is not found
__findattr_ex__
(String name)

Attribute lookup hook.

public PyObject

Returns:

the value corresponding to key or null if key is not found
__finditem__
(PyObject
the key to lookup in this container
key
)

Very similar to the standard Python __getitem__ method.

public PyObject

Returns:

the value corresponding to key or null if key is not found.
__finditem__
(int
the key to lookup in this sequence.
key
)

A variant of the __finditem__ method which accepts a primitive int as the key.

public PyObject

Returns:

the value corresponding to key or null if key is not found.
__finditem__
(String
the key to lookup in this sequence - must be an interned string .
key
)

A variant of the __finditem__ method which accepts a Java String as the key.

public PyFloat

Returns:

a float corresponding to the value of this object.
__float__
()

Equivalent to the standard Python __float__ method.

public PyObject

Returns:

the result of the floordiv, or null if this operation is not defined
__floordiv__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __floordiv__ method

public PyObject
__format__(PyObject formatSpec)

public PyObject

Returns:

the result of the comparison.
__ge__
(PyObject
the object to compare this with.
other
)

Equivalent to the standard Python __ge__ method.

public PyObject

Returns:

- the object defined for this descriptor for the given obj and type.
__get__
(PyObject
- the instance accessing this descriptor. Can be null if this is being accessed by a type.
obj
,
PyObject
- the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.
type
)

Get descriptor for this PyObject.

public final PyObject

Returns:

the value corresponding to name
__getattr__
(PyString
the name to lookup in this namespace
name
)

Equivalent to the standard Python __getattr__ method.

public final PyObject

Returns:

the value corresponding to name
__getattr__
(String
the name to lookup in this namespace must be an interned string .
name
)

A variant of the __getattr__ method which accepts a Java String as the name.

public PyObject

Returns:

the value corresponding to that key.
__getitem__
(int
the key to lookup in this container.
key
)

Equivalent to the standard Python __getitem__ method.

public PyObject

Returns:

the value corresponding to that key.
__getitem__
(PyObject
the key to lookup in this container.
key
)

Equivalent to the standard Python __getitem__ method.

public PyTuple
public PyObject
__getslice__(PyObject s_start, PyObject s_stop, PyObject s_step)

public PyObject
public PyObject

Returns:

the result of the comparison.
__gt__
(PyObject
the object to compare this with.
other
)

Equivalent to the standard Python __gt__ method.

public final PyInteger
__hash__()

Equivalent to the standard Python __hash__ method.

public PyString

Returns:

a string representing this object as a hexadecimal number.
__hex__
()

Equivalent to the standard Python __hex__ method Should only be overridden by numeric objects that can be reasonably represented as a hexadecimal string.

public PyObject

Returns:

the result of the iadd, or null if this operation is not defined
__iadd__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __iadd__ method.

public PyObject

Returns:

the result of the iand, or null if this operation is not defined
__iand__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __iand__ method

public PyObject

Returns:

the result of the idiv, or null if this operation is not defined
__idiv__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __idiv__ method

public PyObject

Returns:

the result of the idivmod, or null if this operation is not defined
__idivmod__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __idivmod__ method

public PyObject

Returns:

the result of the ifloordiv, or null if this operation is not defined
__ifloordiv__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __ifloordiv__ method

public PyObject

Returns:

the result of the ilshift, or null if this operation is not defined
__ilshift__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __ilshift__ method

public PyObject

Returns:

the result of the imod, or null if this operation is not defined
__imod__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __imod__ method

public PyObject

Returns:

the result of the imul, or null if this operation is not defined.
__imul__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __imul__ method.

public PyObject

Returns:

a PyInteger or PyLong
__index__
()

Equivalent to the standard Python __index__ method.

public PyObject

Returns:

an integer corresponding to the value of this object.
__int__
()

Equivalent to the standard Python __int__ method.

public PyObject

Returns:

~this.
__invert__
()

Equivalent to the standard Python __invert__ method.

public PyObject

Returns:

the result of the ior, or null if this operation is not defined
__ior__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __ior__ method

public PyObject

Returns:

the result of the ipow, or null if this operation is not defined
__ipow__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __ipow__ method

public PyObject

Returns:

the result of the irshift, or null if this operation is not defined
__irshift__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __irshift__ method

public PyObject

Returns:

the result of the isub, or null if this operation is not defined
__isub__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __isub__ method

public PyObject
__iter__()

Return an iterator that is used to iterate the element of this sequence.

public PyObject
__iternext__()

Return the next element of the sequence that this is an iterator for.

public PyObject

Returns:

the result of the itruediv, or null if this operation is not defined
__itruediv__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __itruediv__ method

public PyObject

Returns:

the result of the ixor, or null if this operation is not defined
__ixor__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __ixor__ method

public PyObject

Returns:

the result of the comparison.
__le__
(PyObject
the object to compare this with.
other
)

Equivalent to the standard Python __le__ method.

public int

Returns:

the length of the object
__len__
()

Equivalent to the standard Python __len__ method.

public PyObject

Returns:

a PyLong or PyInteger corresponding to the value of this object.
__long__
()

Equivalent to the standard Python __long__ method.

public PyObject

Returns:

the result of the lshift, or null if this operation is not defined
__lshift__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __lshift__ method

public PyObject

Returns:

the result of the comparison.
__lt__
(PyObject
the object to compare this with.
other
)

Equivalent to the standard Python __lt__ method.

public PyObject

Returns:

the result of the mod, or null if this operation is not defined
__mod__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __mod__ method

public PyObject

Returns:

the result of the mul, or null if this operation is not defined
__mul__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __mul__ method.

public PyObject

Returns:

the result of the comparison.
__ne__
(PyObject
the object to compare this with.
other
)

Equivalent to the standard Python __ne__ method.

public PyObject

Returns:

-this.
__neg__
()

Equivalent to the standard Python __neg__ method.

public boolean
__nonzero__()

Equivalent to the standard Python __nonzero__ method.

public PyObject

Returns:

not this.
__not__
()

Implements boolean not

public PyString

Returns:

a string representing this object as an octal number.
__oct__
()

Equivalent to the standard Python __oct__ method.

public PyObject

Returns:

the result of the or, or null if this operation is not defined
__or__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __or__ method

public PyObject

Returns:

+this.
__pos__
()

Equivalent to the standard Python __pos__ method.

public PyObject

Returns:

this object raised to the given power in the given modulus
__pow__
(PyObject
the power to raise this number to.
o2
,
PyObject
the modulus to perform this operation in or null if no modulo is to be used
o3
)

Implements the three argument power function.

public PyObject

Returns:

the result of the pow, or null if this operation is not defined
__pow__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __pow__ method

public PyObject

Returns:

the result of the add, or null if this operation is not defined.
__radd__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __radd__ method.

public PyObject

Returns:

the result of the and, or null if this operation is not defined.
__rand__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rand__ method

protected void
public PyObject

Returns:

the result of the div, or null if this operation is not defined.
__rdiv__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rdiv__ method

public PyObject

Returns:

the result of the divmod, or null if this operation is not defined.
__rdivmod__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rdivmod__ method

public PyObject

Returns:

a tuple of (class, tuple)
__reduce__
()

Used for pickling.

public PyObject

Returns:

a tuple of (class, tuple)
__reduce_ex__
(int
PyInteger specifying reduce algorithm (method without this argument defaults to 0).
arg
)

Used for pickling.

public PyObject
public PyString
__repr__()

Equivalent to the standard Python __repr__ method.

public PyObject

Returns:

the result of the floordiv, or null if this operation is not defined.
__rfloordiv__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rfloordiv__ method

public PyObject

Returns:

the result of the lshift, or null if this operation is not defined.
__rlshift__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rlshift__ method

public PyObject

Returns:

the result of the mod, or null if this operation is not defined.
__rmod__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rmod__ method

public PyObject

Returns:

the result of the mul, or null if this operation is not defined.
__rmul__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rmul__ method.

public PyObject

Returns:

the result of the or, or null if this operation is not defined.
__ror__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __ror__ method

public PyObject

Returns:

the result of the pow, or null if this operation is not defined.
__rpow__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rpow__ method

public PyObject

Returns:

the result of the rshift, or null if this operation is not defined.
__rrshift__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rrshift__ method

public PyObject

Returns:

the result of the rshift, or null if this operation is not defined
__rshift__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __rshift__ method

public PyObject

Returns:

the result of the sub, or null if this operation is not defined.
__rsub__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rsub__ method

public PyObject

Returns:

the result of the truediv, or null if this operation is not defined.
__rtruediv__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rtruediv__ method

public PyObject

Returns:

the result of the xor, or null if this operation is not defined.
__rxor__
(PyObject
the object to perform this binary operation with (the left-hand operand).
other
)

Equivalent to the standard Python __rxor__ method

public void
public final void
__setattr__(PyString
the name to lookup in this namespace
name
,
PyObject value)

Equivalent to the standard Python __setattr__ method.

public void
__setattr__(String
the name whose value will be set - must be an interned string .
name
,
PyObject
the value to set this name to
value
)

A variant of the __setattr__ method which accepts a String as the key.

public void
__setitem__(PyObject
the key whose value will be set
key
,
PyObject
the value to set this key to
value
)

Equivalent to the standard Python __setitem__ method.

public void
__setitem__(String
the key whose value will be set - must be an interned string .
key
,
PyObject
the value to set this key to
value
)

A variant of the __setitem__ method which accepts a String as the key.

public void
__setitem__(int
the key whose value will be set
key
,
PyObject
the value to set this key to
value
)

A variant of the __setitem__ method which accepts a primitive int as the key.

public void
__setslice__(PyObject s_start, PyObject s_stop, PyObject s_step, PyObject value)

public void
__setslice__(PyObject start, PyObject stop, PyObject value)

public PyString
__str__()

Equivalent to the standard Python __str__ method.

public PyObject

Returns:

the result of the sub, or null if this operation is not defined
__sub__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __sub__ method

public Object
__tojava__(Class<?>
the Class to convert this PyObject to.
c
)

Equivalent to the Jython __tojava__ method.

public PyObject

Returns:

the result of the truediv, or null if this operation is not defined
__truediv__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __truediv__ method

public PyObject

Returns:

the Integral closest to x between 0 and x.
__trunc__
()

Equivalent to the standard Python __trunc__ method.

public PyUnicode
public PyObject

Returns:

the result of the xor, or null if this operation is not defined
__xor__
(PyObject
the object to perform this binary operation with (the right-hand operand).
other
)

Equivalent to the standard Python __xor__ method

public final PyObject

Returns:

the result of the add.
_add
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this + o2.

public final PyObject

Returns:

the result of the and.
_and
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this & o2

pack-priv final PyObject

Returns:

the result of the add.
_basic_add
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this + o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the and.
_basic_and
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this & o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the div.
_basic_div
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this / o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the divmod.
_basic_divmod
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this divmod o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the floordiv.
_basic_floordiv
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this // o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the iadd.
_basic_iadd
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this += o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the iand.
_basic_iand
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this &= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the idiv.
_basic_idiv
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this /= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the idivmod.
_basic_idivmod
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this divmod= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the ifloordiv.
_basic_ifloordiv
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this //= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the ilshift.
_basic_ilshift
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this <<= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the imod.
_basic_imod
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this %= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the imul.
_basic_imul
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this *= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the ior.
_basic_ior
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this |= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the ipow.
_basic_ipow
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this **= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the irshift.
_basic_irshift
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this >>= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the isub.
_basic_isub
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this -= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the itruediv.
_basic_itruediv
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this /= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the ixor.
_basic_ixor
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this ^= o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the lshift.
_basic_lshift
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this << o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the mod.
_basic_mod
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this % o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the mul.
_basic_mul
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this * o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the or.
_basic_or
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this | o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the pow.
_basic_pow
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this ** o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the rshift.
_basic_rshift
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this >> o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the sub.
_basic_sub
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this - o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the truediv.
_basic_truediv
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this / o2 when this and o2 have the same type or are builtin types.

pack-priv final PyObject

Returns:

the result of the xor.
_basic_xor
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this ^ o2 when this and o2 have the same type or are builtin types.

private PyObject
_binop_rule(PyType t1, PyObject o2, PyType t2, String left, String right, String op)

public PyObject
_callextra(PyObject[] args, String[] keywords, PyObject starargs, PyObject kwargs)

public final int

Returns:

-1 if this<0; 0 if this==o; +1 if this>o
_cmp
(PyObject
the object to compare this with.
o
)

Implements cmp(this, other)

private final int
private final int
pack-priv PyObject[]

Returns:

PyObject[]
_coerce
(PyObject other)

Implements coerce(this,other), result as PyObject[]

private final int
public final PyObject

Returns:

the result of the div.
_div
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this / o2

public final PyObject

Returns:

the result of the divmod.
_divmod
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this divmod o2

public PyObject
_doget(PyObject container)

public PyObject
_doget(PyObject container, PyObject wherefound)

public boolean
_doset(PyObject container, PyObject value)

public final PyObject

Returns:

the result of the comparison
_eq
(PyObject
the object to compare this with.
o
)

Implements the Python expression this == other.

public final PyObject

Returns:

the result of the floordiv.
_floordiv
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this // o2

public final PyObject

Returns:

the result of the comparison
_ge
(PyObject
the object to compare this with.
o
)

Implements the Python expression this >= other.

public final PyObject

Returns:

the result of the comparison
_gt
(PyObject
the object to compare this with.
o
)

Implements the Python expression this > other.

public final PyObject

Returns:

the result of the iadd.
_iadd
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this += o2.

public final PyObject

Returns:

the result of the iand.
_iand
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this &= o2

public final PyObject

Returns:

the result of the idiv.
_idiv
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this /= o2

public final PyObject

Returns:

the result of the idivmod.
_idivmod
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this divmod= o2

public final PyObject

Returns:

the result of the ifloordiv.
_ifloordiv
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this //= o2

public final PyObject

Returns:

the result of the ilshift.
_ilshift
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this <<= o2

public final PyObject

Returns:

the result of the imod.
_imod
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this %= o2

public final PyObject

Returns:

the result of the imul.
_imul
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this *= o2.

public final PyObject

Returns:

the result of the search.
_in
(PyObject
the container to search for this element.
o
)

Implements in operator.

public final PyObject

Returns:

the result of the ior.
_ior
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this |= o2

public final PyObject

Returns:

the result of the ipow.
_ipow
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this **= o2

public final PyObject

Returns:

the result of the irshift.
_irshift
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this >>= o2

public PyObject

Returns:

the result of the comparison
_is
(PyObject
the object to compare this with.
o
)

Implements is operator.

public PyObject

Returns:

the result of the comparison
_isnot
(PyObject
the object to compare this with.
o
)

Implements is not operator.

public final PyObject

Returns:

the result of the isub.
_isub
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this -= o2

public final PyObject

Returns:

the result of the itruediv.
_itruediv
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this /= o2

public final PyObject

Returns:

the result of the ixor.
_ixor
(PyObject
the object to perform this inplace binary operation with.
o2
)

Implements the Python expression this ^= o2

public PyObject
_jcall(Object[] args)

public PyObject
_jcallexc(Object[] args)

A convenience function for PyProxys.

public void
public final PyObject

Returns:

the result of the comparison
_le
(PyObject
the object to compare this with.
o
)

Implements the Python expression this <= other.

public final PyObject

Returns:

the result of the lshift.
_lshift
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this << o2

public final PyObject

Returns:

the result of the comparison
_lt
(PyObject
the object to compare this with.
o
)

Implements the Python expression this < other.

public final PyObject

Returns:

the result of the mod.
_mod
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this % o2

public final PyObject

Returns:

the result of the mul.
_mul
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this * o2.

public final PyObject

Returns:

the result of the comparison
_ne
(PyObject
the object to compare this with.
o
)

Implements the Python expression this != other.

public final PyObject

Returns:

the result of the search.
_notin
(PyObject
the container to search for this element.
o
)

Implements not in operator.

public final PyObject

Returns:

the result of the or.
_or
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this | o2

public final PyObject

Returns:

the result of the pow.
_pow
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this ** o2

public final PyObject

Returns:

the result of the rshift.
_rshift
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this >> o2

public final PyObject

Returns:

the result of the sub.
_sub
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this - o2

public final PyObject

Returns:

the result of the truediv.
_truediv
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this / o2

private int

Returns:

-1, 0, -1 or -2, according to the __cmp__ protocol.
_try__cmp__
(PyObject other)

Tries a 3-way comparison, using __cmp__.

protected final String
_unsupportedop(String
the String form of the op (e.g. "+")
op
,
PyObject
the right operand
o2
)

public final PyObject

Returns:

the result of the xor.
_xor
(PyObject
the object to perform this binary operation with.
o2
)

Implements the Python expression this ^ o2

protected final PyObject
adaptToCoerceTuple(Object
either a PyObject[2] or a PyObject, as given by __coerce_ex__(PyObject).
o
)

Adapts the result of __coerce_ex__ to a tuple of two elements, with the resulting coerced values, or to Py.NotImplemented, if o is Py.None.

public double

Returns:

a double value
asDouble
()

Convert this object into a double.

public int

Returns:

an index-sized int
asIndex
()

Convert this object into an index-sized integer.

public int

Returns:

an index-sized int
asIndex
(PyObject
the Python exception to raise on OverflowErrors
err
)

Convert this object into an index-sized integer.

public int
asInt(int index)

public int

Returns:

an int value
asInt
()

Convert this object into an int.

public Iterable<PyObject>
asIterable()

Returns an Iterable over the Python iterator returned by __iter__ on this object.

public long
asLong(int index)

public long

Returns:

an long value
asLong
()

Convert this object into a long.

public static final String
public String
asName(int index)

public String
asString(int index)

public String
public String
asStringOrNull(int index)

public String
public int

Returns:

the bit_length of this object.
bit_length
()

Equivalent to the standard Python bit_length method.

private static final PyObject
private PyObject
commonReduce(int proto)

A common helper method, use to prevent infinite recursion when a Python object implements __reduce__ and sometimes calls object.__reduce__.

public PyObject

Returns:

the complex conjugate.
conjugate
()

Equivalent to the standard Python conjugate method.

public void
private static final void
public void
public void
dispatch__init__(PyObject[] args, String[] keywords)

Dispatch __init__ behavior

public boolean
equals(Object
the reference object with which to compare.
ob_other
)

Overrides java.lang.Object.equals.

Should almost never be overridden.

public PyObject
public PyObject

Returns:

internal object per instance dict or null
fastGetDict
()

xxx implements where meaningful

protected final void
finalize()

Overrides java.lang.Object.finalize.

From Jython 2.7 on, PyObjects must not have finalizers directly.

public PyObject

Returns:

internal object __dict__ or null
getDict
()

xxx implements where meaningful

protected Object
public PyType
private void
hackCheck(String
String method name to check for
what
)

Helper to check for object.__setattr__ or __delattr__ applied to a type (The Carlo Verre hack).

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

protected PyObject

Returns:

corresponding value (a module or package) or null if not found
impAttr
(String
relative to this object must be an interned string.
name
)

This is a hook called during the import mechanism when the target module is (or may be) a sub-module of this object.

public boolean
public boolean
public boolean
public PyObject

Returns:

the result of calling the method name with args and keywords.
invoke
(String
the name of the method to call. This must be an interned string!
name
,
PyObject[]
an array of the arguments to the call.
args
,
String[]
the keywords to use in the call.
keywords
)

Shortcut for calling a method on a PyObject from Java.

public PyObject
invoke(String name, PyObject[] args)

public PyObject

Returns:

the result of calling the method name with no args
invoke
(String
the name of the method to call. This must be an interned string!
name
)

Shortcut for calling a method on a PyObject with no args.

public PyObject

Returns:

the result of calling the method name with arg1
invoke
(String
the name of the method to call. This must be an interned string!
name
,
PyObject
the one argument of the method.
arg1
)

Shortcut for calling a method on a PyObject with one arg.

public PyObject

Returns:

the result of calling the method name with arg1 and arg2
invoke
(String
the name of the method to call. This must be an interned string!
name
,
PyObject
the first argument of the method.
arg1
,
PyObject
the second argument of the method.
arg2
)

Shortcut for calling a method on a PyObject with two args.

public PyObject

Returns:

the result of calling the method name with arg1 args and keywords
invoke
(String
the name of the method to call. This must be an interned string!
name
,
PyObject
the first argument of the method.
arg1
,
PyObject[]
an array of the arguments to the call.
args
,
String[]
the keywords to use in the call.
keywords
)

Shortcut for calling a method on a PyObject with one extra initial argument.

public boolean
public boolean
public boolean

Returns:

true if the object can act as an index
isIndex
()

Determine if this object can act as an index (implements __index__).

public boolean

Returns:

true if the object can act as an int
isInteger
()

Determine if this object can act as an int (implements __int__).

public boolean
public boolean
public boolean
private boolean

Returns:

true if this is a special case
isStrUnicodeSpecialCase
(PyType
left side PyType
t1
,
PyType
right side PyType
t2
,
String
the binary operation's String
op
)

Determine if the binary op on types t1 and t2 is an add operation dealing with a str/unicode and a str/unicode subclass.

pack-priv boolean
private PyObject
protected void
protected void
protected void
public void
pack-priv final boolean
pack-priv final void
pack-priv final void
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final int
pack-priv final void
object___init__(PyObject[] args, String[] keywords)

pack-priv static final PyObject
object___new__(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

pack-priv final PyObject
pack-priv final PyObject
pack-priv final void
pack-priv final void
public static PyObject
pack-priv final String
pack-priv void
proxyInit()

Attempts to automatically initialize our Java proxy if we have one and it wasn't initialized by our __init__.

public void
private PyObject
protected String
runsupportedopMessage(String op, PyObject o2)

Should return an error message suitable for substitution where.

public void
setDict(PyObject newDict)

public void
private static PyObject
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected String
unsupportedopMessage(String op, PyObject o2)

Should return an error message suitable for substitution where.

Inherited from java.lang.Object:
clonegetClassnotifynotifyAllwaitwaitwait