Struct pyo3::PySequence [] [src]

pub struct PySequence(_);

Represents a reference to a python object supporting the sequence protocol.

Methods

impl PySequence
[src]

[src]

Returns the number of objects in sequence. This is equivalent to Python len().

[src]

Return the concatenation of o1 and o2. Equivalent to python o1 + o2

[src]

Return the result of repeating sequence object o count times. Equivalent to python o * count NB: Python accepts negative counts; it returns an empty Sequence.

[src]

Concatenate of o1 and o2 on success. Equivalent to python o1 += o2

[src]

Repeate sequence object o count times and store in self. Equivalent to python o *= count NB: Python accepts negative counts; it empties the Sequence.

[src]

Return the ith element of the Sequence. Equivalent to python o[index]

[src]

Return the slice of sequence object o between begin and end. This is the equivalent of the Python expression o[begin:end]

[src]

Assign object v to the ith element of o. Equivalent to Python statement o[i] = v

[src]

Delete the ith element of object o. Python statement del o[i]

[src]

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

[src]

Delete the slice in sequence object o from i1 to i2. equivalent of the Python statement del o[i1:i2]

[src]

Return the number of occurrences of value in o, that is, return the number of keys for which o[key] == value

[src]

Determine if o contains value. this is equivalent to the Python expression value in o

[src]

Return the first index i for which o[i] == value. This is equivalent to the Python expression o.index(value)

[src]

Return a fresh list based on the Sequence.

[src]

Return a fresh tuple based on the Sequence.

Trait Implementations

impl AsRef<PyObjectRef> for PySequence
[src]

[src]

Performs the conversion.

impl PyObjectWithToken for PySequence
[src]

[src]

impl ToPyPointer for PySequence
[src]

[src]

Gets the underlying FFI pointer, returns a borrowed pointer.

impl PartialEq for PySequence
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> FromPyObject<'a> for &'a PySequence
[src]

[src]

Extracts Self from the source PyObject.

impl PyTryFrom for PySequence
[src]

The type returned in the event of a conversion error.

[src]

Cast from a concrete Python object type to PyObject.

[src]

Cast from a concrete Python object type to PyObject. With exact type check.

[src]

Cast from a concrete Python object type to PyObject.

[src]

Cast from a concrete Python object type to PyObject. With exact type check.