Liking cljdoc? Tell your friends :D

libpython-clj.jna.protocols.object


bool-fn-constantclj

(bool-fn-constant item)
source

bool-fn-tableclj

source

Py_DecRefclj

(Py_DecRef py-obj)

Decrement the refference count on an object

Decrement the refference count on an object
sourceraw docstring

Py_IncRefclj

(Py_IncRef py-obj)

Increment the reference count on an object

Increment the reference count on an object
sourceraw docstring

PyCallable_Checkclj

(PyCallable_Check pyobj)

Determine if the object o is callable. Return 1 if the object is callable and 0 otherwise. This function always succeeds.

Determine if the object o is callable. Return 1 if the object is callable and 0
otherwise. This function always succeeds.
sourceraw docstring

PyObject_Callclj

(PyObject_Call callable args kwargs)

Return value: New reference.

Call a callable Python object callable, with arguments given by the tuple args, and named arguments given by the dictionary kwargs.

args must not be NULL, use an empty tuple if no arguments are needed. If no named arguments are needed, kwargs can be NULL.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: callable(*args, **kwargs).

Return value: New reference.

Call a callable Python object callable, with arguments given by the tuple args, and
named arguments given by the dictionary kwargs.

args must not be NULL, use an empty tuple if no arguments are needed. If no named
arguments are needed, kwargs can be NULL.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: callable(*args, **kwargs).
sourceraw docstring

PyObject_CallObjectclj

(PyObject_CallObject callable args)

Return value: New reference.

Call a callable Python object callable, with arguments given by the tuple args. If no arguments are needed, then args can be NULL.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: callable(*args).

Return value: New reference.

Call a callable Python object callable, with arguments given by the tuple args. If no
arguments are needed, then args can be NULL.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: callable(*args).
sourceraw docstring

PyObject_DelAttrclj

(PyObject_DelAttr pyobj attr-name)

Delete attribute named attr_name, for object o. Returns -1 on failure. This is the equivalent of the Python statement del o.attr_name.

Delete attribute named attr_name, for object o. Returns -1 on failure. This is the
equivalent of the Python statement del o.attr_name.
sourceraw docstring

PyObject_DelAttrStringclj

(PyObject_DelAttrString pyobj attr-name)

Delete attribute named attr_name, for object o. Returns -1 on failure. This is the equivalent of the Python statement del o.attr_name.

Delete attribute named attr_name, for object o. Returns -1 on failure. This is the
equivalent of the Python statement del o.attr_name.
sourceraw docstring

PyObject_DelItemclj

(PyObject_DelItem o key)

Remove the mapping for the object key from the object o. Return -1 on failure. This is equivalent to the Python statement del o[key].

Remove the mapping for the object key from the object o. Return -1 on failure. This
is equivalent to the Python statement del o[key].
sourceraw docstring

PyObject_Dirclj

(PyObject_Dir o)

Return value: New reference.

This is equivalent to the Python expression dir(o), returning a (possibly empty) list of strings appropriate for the object argument, or NULL if there was an error. If the argument is NULL, this is like the Python dir(), returning the names of the current locals; in this case, if no execution frame is active then NULL is returned but PyErr_Occurred() will return false.

Return value: New reference.

This is equivalent to the Python expression dir(o), returning a (possibly empty)
list of strings appropriate for the object argument, or NULL if there was an
error. If the argument is NULL, this is like the Python dir(), returning the names
of the current locals; in this case, if no execution frame is active then NULL is
returned but PyErr_Occurred() will return false.
sourceraw docstring

PyObject_GenericGetAttrclj

(PyObject_GenericGetAttr pyobj attr-name)

Return value: New reference.

Generic attribute getter function that is meant to be put into a type object’s tp_getattro slot. It looks for a descriptor in the dictionary of classes in the object’s MRO as well as an attribute in the object’s dict (if present). As outlined in Implementing Descriptors, data descriptors take preference over instance attributes, while non-data descriptors don’t. Otherwise, an AttributeError is raised.

Return value: New reference.

Generic attribute getter function that is meant to be put into a type object’s
tp_getattro slot. It looks for a descriptor in the dictionary of classes in the
object’s MRO as well as an attribute in the object’s __dict__ (if present). As
outlined in Implementing Descriptors, data descriptors take preference over instance
attributes, while non-data descriptors don’t. Otherwise, an AttributeError is
raised.
sourceraw docstring

PyObject_GenericGetDictclj

(PyObject_GenericGetDict pyobj context)

Return value: New reference.

A generic implementation for the getter of a dict descriptor. It creates the dictionary if necessary.

New in version 3.3.

Return value: New reference.

A generic implementation for the getter of a __dict__ descriptor. It creates the
dictionary if necessary.

New in version 3.3.
sourceraw docstring

PyObject_GenericSetAttrclj

(PyObject_GenericSetAttr pyobj attr-name v)

Generic attribute setter and deleter function that is meant to be put into a type object’s tp_setattro slot. It looks for a data descriptor in the dictionary of classes in the object’s MRO, and if found it takes preference over setting or deleting the attribute in the instance dictionary. Otherwise, the attribute is set or deleted in the object’s dict (if present). On success, 0 is returned, otherwise an AttributeError is raised and -1 is returned.

Generic attribute setter and deleter function that is meant to be put into a type
object’s tp_setattro slot. It looks for a data descriptor in the dictionary of classes
in the object’s MRO, and if found it takes preference over setting or deleting the
attribute in the instance dictionary. Otherwise, the attribute is set or deleted in
the object’s __dict__ (if present). On success, 0 is returned, otherwise an
AttributeError is raised and -1 is returned.
sourceraw docstring

PyObject_GenericSetDictclj

(PyObject_GenericSetDict pyobj context)

A generic implementation for the setter of a dict descriptor. This implementation does not allow the dictionary to be deleted.

New in version 3.3.

A generic implementation for the setter of a __dict__ descriptor. This implementation
does not allow the dictionary to be deleted.

New in version 3.3.
sourceraw docstring

PyObject_GetAttrclj

(PyObject_GetAttr pyobj attr-name)

Return value: New reference.

Retrieve an attribute named attr_name from object o. Returns the attribute value on success, or NULL on failure. This is the equivalent of the Python expression o.attr_name.

Return value: New reference.

Retrieve an attribute named attr_name from object o. Returns the attribute value on
success, or NULL on failure. This is the equivalent of the Python expression
o.attr_name.
sourceraw docstring

PyObject_GetAttrStringclj

(PyObject_GetAttrString pyobj attr-name)

Return value: New reference.

Retrieve an attribute named attr_name from object o. Returns the attribute value on success, or NULL on failure. This is the equivalent of the Python expression o.attr_name.

Return value: New reference.

Retrieve an attribute named attr_name from object o. Returns the attribute value on
success, or NULL on failure. This is the equivalent of the Python expression
o.attr_name.
sourceraw docstring

PyObject_GetItemclj

(PyObject_GetItem o key)

Return value: New reference.

Return element of o corresponding to the object key or NULL on failure. This is the equivalent of the Python expression o[key].

Return value: New reference.

Return element of o corresponding to the object key or NULL on failure. This is the
equivalent of the Python expression o[key].
sourceraw docstring

PyObject_GetIterclj

(PyObject_GetIter o)

Return value: New reference.

This is equivalent to the Python expression iter(o). It returns a new iterator for the object argument, or the object itself if the object is already an iterator. Raises TypeError and returns NULL if the object cannot be iterated.

Return value: New reference.

This is equivalent to the Python expression iter(o). It returns a new iterator for
the object argument, or the object itself if the object is already an
iterator. Raises TypeError and returns NULL if the object cannot be iterated.
sourceraw docstring

PyObject_HasAttrclj

(PyObject_HasAttr pyobj attr-name)

Returns 1 if o has the attribute attr_name, and 0 otherwise. This is equivalent to the Python expression hasattr(o, attr_name). This function always succeeds.

Note that exceptions which occur while calling getattr() and getattribute() methods will get suppressed. To get error reporting use PyObject_GetAttr() instead.

Returns 1 if o has the attribute attr_name, and 0 otherwise. This is equivalent to
the Python expression hasattr(o, attr_name). This function always succeeds.

 Note that exceptions which occur while calling __getattr__() and __getattribute__()
 methods will get suppressed. To get error reporting use PyObject_GetAttr() instead.
sourceraw docstring

PyObject_HasAttrStringclj

(PyObject_HasAttrString pyobj attr-name)

Returns 1 if o has the attribute attr_name, and 0 otherwise. This is equivalent to the Python expression hasattr(o, attr_name). This function always succeeds.

Note that exceptions which occur while calling getattr() and getattribute() methods and creating a temporary string object will get suppressed. To get error reporting use Pointer_GetAttrString() instead.

Returns 1 if o has the attribute attr_name, and 0 otherwise. This is equivalent to
the Python expression hasattr(o, attr_name). This function always succeeds.

 Note that exceptions which occur while calling __getattr__() and __getattribute__()
 methods and creating a temporary string object will get suppressed. To get error
 reporting use Pointer_GetAttrString() instead.
sourceraw docstring

PyObject_Hashclj

(PyObject_Hash o)

Compute and return the hash value of an object o. On failure, return -1. This is the equivalent of the Python expression hash(o).

Changed in version 3.2: The return type is now Py_hash_t. This is a signed integer the same size as Py_ssize_t.

Compute and return the hash value of an object o. On failure, return -1. This is the
equivalent of the Python expression hash(o).

 Changed in version 3.2: The return type is now Py_hash_t. This is a signed integer
 the same size as Py_ssize_t.
sourceraw docstring

PyObject_IsTrueclj

(PyObject_IsTrue py-obj)

Returns 1 if the object o is considered to be true, and 0 otherwise. This is equivalent to the Python expression not not o. On failure, return -1.

Returns 1 if the object o is considered to be true, and 0 otherwise. This is
equivalent to the Python expression not not o. On failure, return -1.
sourceraw docstring

PyObject_Lengthclj

(PyObject_Length py-obj)

Return the length of object o. If the object o provides either the sequence and mapping protocols, the sequence length is returned. On error, -1 is returned. This is the equivalent to the Python expression len(o).

Return the length of object o. If the object o provides either the sequence and
mapping protocols, the sequence length is returned. On error, -1 is returned. This is
the equivalent to the Python expression len(o).
sourceraw docstring

PyObject_Notclj

(PyObject_Not py-obj)

Returns 0 if the object o is considered to be true, and 1 otherwise. This is equivalent to the Python expression not o. On failure, return -1.

Returns 0 if the object o is considered to be true, and 1 otherwise. This is
equivalent to the Python expression not o. On failure, return -1.
sourceraw docstring

PyObject_Reprclj

(PyObject_Repr py_obj)

Return value: New reference.

Compute a string representation of object o. Returns the string representation on success, NULL on failure. This is the equivalent of the Python expression repr(o). Called by the repr() built-in function.

Changed in version 3.4: This function now includes a debug assertion to help ensure that it does not silently discard an active exception.

Return value: New reference.

Compute a string representation of object o. Returns the string representation on
success, NULL on failure. This is the equivalent of the Python expression
repr(o). Called by the repr() built-in function.

Changed in version 3.4: This function now includes a debug assertion to help ensure
that it does not silently discard an active exception.
sourceraw docstring

PyObject_RichCompareclj

(PyObject_RichCompare o1 o2 opid)

Return value: New reference.

Compare the values of o1 and o2 using the operation specified by opid, which must be one of Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, or Py_GE, corresponding to <, <=, ==, !=,

, or >= respectively. This is the equivalent of the Python expression o1 op o2, where op is the operator corresponding to opid. Returns the value of the comparison on success, or NULL on failure.

Return value: New reference.

Compare the values of o1 and o2 using the operation specified by opid, which must be
one of Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, or Py_GE, corresponding to <, <=, ==, !=,
>, or >= respectively. This is the equivalent of the Python expression o1 op o2,
where op is the operator corresponding to opid. Returns the value of the comparison
on success, or NULL on failure.
sourceraw docstring

PyObject_RichCompareBoolclj

(PyObject_RichCompareBool o1 o2 opid)

Compare the values of o1 and o2 using the operation specified by opid, which must be one of Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, or Py_GE, corresponding to <, <=, ==, !=, >, or >= respectively. Returns -1 on error, 0 if the result is false, 1 otherwise. This is the equivalent of the Python expression o1 op o2, where op is the operator corresponding to opid.

Note

If o1 and o2 are the same object, PyObject_RichCompareBool() will always return 1 for Py_EQ and 0 for Py_NE.

Compare the values of o1 and o2 using the operation specified by opid, which must be
one of Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, or Py_GE, corresponding to <, <=, ==, !=, >,
or >= respectively. Returns -1 on error, 0 if the result is false, 1 otherwise. This
is the equivalent of the Python expression o1 op o2, where op is the operator
corresponding to opid.

 Note

 If o1 and o2 are the same object, PyObject_RichCompareBool() will always return 1 for
 Py_EQ and 0 for Py_NE.
sourceraw docstring

PyObject_SetAttrclj

(PyObject_SetAttr pyobj attr-name v)

Set the value of the attribute named attr_name, for object o, to the value v. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement o.attr_name = v.

If v is NULL, the attribute is deleted, however this feature is deprecated in favour of using PyObject_DelAttr().

Set the value of the attribute named attr_name, for object o, to the value v. Raise
an exception and return -1 on failure; return 0 on success. This is the equivalent of
the Python statement o.attr_name = v.

If v is NULL, the attribute is deleted, however this feature is deprecated in favour
of using PyObject_DelAttr().
sourceraw docstring

PyObject_SetAttrStringclj

(PyObject_SetAttrString pyobj attr-name v)

Set the value of the attribute named attr_name, for object o, to the value v. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement o.attr_name = v.

If v is NULL, the attribute is deleted, however this feature is deprecated in favour of using PyObject_DelAttrString().

Set the value of the attribute named attr_name, for object o, to the value v. Raise
an exception and return -1 on failure; return 0 on success. This is the equivalent of
the Python statement o.attr_name = v.

If v is NULL, the attribute is deleted, however this feature is deprecated in favour
of using PyObject_DelAttrString().
sourceraw docstring

PyObject_SetItemclj

(PyObject_SetItem o key v)

Map the object key to the value v. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement o[key] = v.

Map the object key to the value v. Raise an exception and return -1 on failure;
return 0 on success. This is the equivalent of the Python statement o[key] = v.
sourceraw docstring

PyObject_Strclj

(PyObject_Str py-obj)

Return value: New reference.

Compute a string representation of object o. Returns the string representation on success, NULL on failure. This is the equivalent of the Python expression str(o). Called by the str() built-in function and by the print statement.

Return value: New reference.

Compute a string representation of object o. Returns the string representation on
success, NULL on failure. This is the equivalent of the Python expression str(o). Called
by the str() built-in function and by the print statement.
sourceraw docstring

PyObject_Typeclj

(PyObject_Type py-obj)

Return value: New reference.

When o is non-NULL, returns a type object corresponding to the object type of object o. On failure, raises SystemError and returns NULL. This is equivalent to the Python expression type(o). This function increments the reference count of the return value. There’s really no reason to use this function instead of the common expression o->ob_type, which returns a pointer of type PyTypeObject*, except when the incremented reference count is needed.

Return value: New reference.

When o is non-NULL, returns a type object corresponding to the object type of object
o. On failure, raises SystemError and returns NULL. This is equivalent to the Python
expression type(o). This function increments the reference count of the return
value. There’s really no reason to use this function instead of the common
expression o->ob_type, which returns a pointer of type PyTypeObject*, except when
the incremented reference count is needed.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close