C# Class Python.Runtime.PySequence

Represents a generic Python sequence. The methods of this class are equivalent to the Python "abstract sequence API". See http://www.python.org/doc/current/api/sequence.html for details.
Inheritance: PyObject
Afficher le fichier Open project: fkarb/pythonnet

Méthodes publiques

Méthode Description
Concat ( PyObject other ) : PyObject

Concat Method

Return the concatenation of the sequence object with the passed in sequence object.

Contains ( PyObject item ) : bool

Contains Method

Return true if the sequence contains the given item. This method throws a PythonException if an error occurs during the check.

DelSlice ( int i1, int i2 ) : void

DelSlice Method

Deletes the slice of the sequence with the given indices.

GetSlice ( int i1, int i2 ) : PyObject

GetSlice Method

Return the slice of the sequence with the given indices.

Index ( PyObject item ) : int

Index Method

Return the index of the given item in the sequence, or -1 if the item does not appear in the sequence.

IsSequenceType ( PyObject value ) : bool

IsSequenceType Method

Returns true if the given object implements the sequence protocol.

Repeat ( int count ) : PyObject

Repeat Method

Return the sequence object repeated N times. This is equivalent to the Python expression "object * count".

SetSlice ( int i1, int i2, PyObject v ) : void

SetSlice Method

Sets the slice of the sequence with the given indices.

Méthodes protégées

Méthode Description
PySequence ( ) : System
PySequence ( IntPtr ptr ) : System

Method Details

Concat() public méthode

Concat Method
Return the concatenation of the sequence object with the passed in sequence object.
public Concat ( PyObject other ) : PyObject
other PyObject
Résultat PyObject

Contains() public méthode

Contains Method
Return true if the sequence contains the given item. This method throws a PythonException if an error occurs during the check.
public Contains ( PyObject item ) : bool
item PyObject
Résultat bool

DelSlice() public méthode

DelSlice Method
Deletes the slice of the sequence with the given indices.
public DelSlice ( int i1, int i2 ) : void
i1 int
i2 int
Résultat void

GetSlice() public méthode

GetSlice Method
Return the slice of the sequence with the given indices.
public GetSlice ( int i1, int i2 ) : PyObject
i1 int
i2 int
Résultat PyObject

Index() public méthode

Index Method
Return the index of the given item in the sequence, or -1 if the item does not appear in the sequence.
public Index ( PyObject item ) : int
item PyObject
Résultat int

IsSequenceType() public static méthode

IsSequenceType Method
Returns true if the given object implements the sequence protocol.
public static IsSequenceType ( PyObject value ) : bool
value PyObject
Résultat bool

PySequence() protected méthode

protected PySequence ( ) : System
Résultat System

PySequence() protected méthode

protected PySequence ( IntPtr ptr ) : System
ptr System.IntPtr
Résultat System

Repeat() public méthode

Repeat Method
Return the sequence object repeated N times. This is equivalent to the Python expression "object * count".
public Repeat ( int count ) : PyObject
count int
Résultat PyObject

SetSlice() public méthode

SetSlice Method
Sets the slice of the sequence with the given indices.
public SetSlice ( int i1, int i2, PyObject v ) : void
i1 int
i2 int
v PyObject
Résultat void