Liking cljdoc? Tell your friends :D

libpython-clj.jna.protocols.sequence


PySequence_Checkclj

(PySequence_Check o)

Return 1 if the object provides sequence protocol, and 0 otherwise. Note that it returns 1 for Python classes with a getitem() method unless they are dict subclasses since in general case it is impossible to determine what the type of keys it supports. This function always succeeds.

Return 1 if the object provides sequence protocol, and 0 otherwise. Note that it
returns 1 for Python classes with a __getitem__() method unless they are dict
subclasses since in general case it is impossible to determine what the type of keys
it supports. This function always succeeds.
sourceraw docstring

PySequence_Concatclj

(PySequence_Concat o1 o2)

Return value: New reference.

Return the concatenation of o1 and o2 on success, and NULL on failure. This is the equivalent of the Python expression o1 + o2.

Return value: New reference.

Return the concatenation of o1 and o2 on success, and NULL on failure. This is the
equivalent of the Python expression o1 + o2.
sourceraw docstring

PySequence_Containsclj

(PySequence_Contains o value)

Determine if o contains value. If an item in o is equal to value, return 1, otherwise return 0. On error, return -1. This is equivalent to the Python expression value in o.

Determine if o contains value. If an item in o is equal to value, return 1, otherwise
return 0. On error, return -1. This is equivalent to the Python expression value in
o.
sourceraw docstring

PySequence_Countclj

(PySequence_Count o value)

Return the number of occurrences of value in o, that is, return the number of keys for which o[key] == value. On failure, return -1. This is equivalent to the Python expression o.count(value).

Return the number of occurrences of value in o, that is, return the number of keys
for which o[key] == value. On failure, return -1. This is equivalent to the Python
expression o.count(value).
sourceraw docstring

PySequence_DelItemclj

(PySequence_DelItem o i)

Delete the ith element of object o. Returns -1 on failure. This is the equivalent of the Python statement del o[i].

Delete the ith element of object o. Returns -1 on failure. This is the equivalent of
the Python statement del o[i].
sourceraw docstring

PySequence_DelSliceclj

(PySequence_DelSlice o i1 i2)

Delete the slice in sequence object o from i1 to i2. Returns -1 on failure. This is the equivalent of the Python statement del o[i1:i2].

Delete the slice in sequence object o from i1 to i2. Returns -1 on failure. This is
the equivalent of the Python statement del o[i1:i2].
sourceraw docstring

PySequence_GetItemclj

(PySequence_GetItem o i)

Return value: New reference.

Return the ith element of o, or NULL on failure. This is the equivalent of the Python expression o[i].

Return value: New reference.

Return the ith element of o, or NULL on failure. This is the equivalent of the Python
expression o[i].
sourceraw docstring

PySequence_GetSliceclj

(PySequence_GetSlice o i1 i2)

Return value: New reference.

Return the slice of sequence object o between i1 and i2, or NULL on failure. This is the equivalent of the Python expression o[i1:i2].

Return value: New reference.

Return the slice of sequence object o between i1 and i2, or NULL on failure. This is
the equivalent of the Python expression o[i1:i2].
sourceraw docstring

PySequence_Indexclj

(PySequence_Index o value)

Return the first index i for which o[i] == value. On error, return -1. This is equivalent to the Python expression o.index(value).

Return the first index i for which o[i] == value. On error, return -1. This is
equivalent to the Python expression o.index(value).
sourceraw docstring

PySequence_InPlaceConcatclj

(PySequence_InPlaceConcat o1 o2)

Return value: New reference.

Return the concatenation of o1 and o2 on success, and NULL on failure. The operation is done in-place when o1 supports it. This is the equivalent of the Python expression o1 += o2.

Return value: New reference.

Return the concatenation of o1 and o2 on success, and NULL on failure. The operation
is done in-place when o1 supports it. This is the equivalent of the Python expression
o1 += o2.
sourceraw docstring

PySequence_InPlaceRepeatclj

(PySequence_InPlaceRepeat o count)

Return value: New reference.

Return the result of repeating sequence object o count times, or NULL on failure. The operation is done in-place when o supports it. This is the equivalent of the Python expression o *= count.

Return value: New reference.

Return the result of repeating sequence object o count times, or NULL on failure. The
operation is done in-place when o supports it. This is the equivalent of the Python
expression o *= count.
sourceraw docstring

PySequence_Lengthclj

(PySequence_Length o)

Returns the number of objects in sequence o on success, and -1 on failure. This is equivalent to the Python expression len(o).

Returns the number of objects in sequence o on success, and -1 on failure. This is
equivalent to the Python expression len(o).
sourceraw docstring

PySequence_Listclj

(PySequence_List o)

Return value: New reference.

Return a list object with the same contents as the sequence or iterable o, or NULL on failure. The returned list is guaranteed to be new. This is equivalent to the Python expression list(o).

Return value: New reference.

Return a list object with the same contents as the sequence or iterable o, or NULL on
failure. The returned list is guaranteed to be new. This is equivalent to the Python
expression list(o).
sourceraw docstring

PySequence_Repeatclj

(PySequence_Repeat o count)

Return value: New reference.

Return the result of repeating sequence object o count times, or NULL on failure. This is the equivalent of the Python expression o * count.

Return value: New reference.

Return the result of repeating sequence object o count times, or NULL on
failure. This is the equivalent of the Python expression o * count.
sourceraw docstring

PySequence_SetItemclj

(PySequence_SetItem o i v)

Assign object v to the ith element of o. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement o[i] = v. This function does not steal a reference to v.

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

Assign object v to the ith element of o. Raise an exception and return -1 on failure;
return 0 on success. This is the equivalent of the Python statement o[i] = v. This
function does not steal a reference to v.

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

PySequence_SetSliceclj

(PySequence_SetSlice o i1 i2 v)

Assign the sequence object v to the slice in sequence object o from i1 to i2. This is the equivalent of the Python statement o[i1:i2] = v.

Assign the sequence object v to the slice in sequence object o from i1 to i2. This is
the equivalent of the Python statement o[i1:i2] = v.
sourceraw docstring

PySequence_Tupleclj

(PySequence_Tuple o)

Return value: New reference.

Return a tuple object with the same contents as the sequence or iterable o, or NULL on failure. If o is a tuple, a new reference will be returned, otherwise a tuple will be constructed with the appropriate contents. This is equivalent to the Python expression tuple(o).

Return value: New reference.

Return a tuple object with the same contents as the sequence or iterable o, or NULL
on failure. If o is a tuple, a new reference will be returned, otherwise a tuple will
be constructed with the appropriate contents. This is equivalent to the Python
expression tuple(o).
sourceraw docstring

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

× close