C# 클래스 Python.Runtime.PyList

Represents a standard Python list object. See the documentation at http://www.python.org/doc/current/api/listObjects.html for details.
상속: PySequence
파일 보기 프로젝트 열기: fkarb/pythonnet 1 사용 예제들

공개 메소드들

메소드 설명
Append ( PyObject item ) : void

Append Method

Append an item to the list object.

AsList ( PyObject value ) : PyList

AsList Method

Converts a Python object to a Python list if possible, raising a PythonException if the conversion is not possible. This is equivalent to the Python expression "list(object)".

Insert ( int index, PyObject item ) : void

Insert Method

Insert an item in the list object at the given index.

IsListType ( PyObject value ) : bool

IsListType Method

Returns true if the given object is a Python list.

PyList ( ) : System

PyList Constructor

Creates a new empty Python list object.

PyList ( IntPtr ptr ) : System

PyList Constructor

Creates a new PyList from an existing object reference. Note that the instance assumes ownership of the object reference. The object reference is not checked for type-correctness.

PyList ( PyObject o ) : System

PyList Constructor

Copy constructor - obtain a PyList from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python list object.

Reverse ( ) : void

Reverse Method

Reverse the order of the list object in place.

Sort ( ) : void

Sort Method

Sort the list in place.

메소드 상세

Append() 공개 메소드

Append Method
Append an item to the list object.
public Append ( PyObject item ) : void
item PyObject
리턴 void

AsList() 공개 정적인 메소드

AsList Method
Converts a Python object to a Python list if possible, raising a PythonException if the conversion is not possible. This is equivalent to the Python expression "list(object)".
public static AsList ( PyObject value ) : PyList
value PyObject
리턴 PyList

Insert() 공개 메소드

Insert Method
Insert an item in the list object at the given index.
public Insert ( int index, PyObject item ) : void
index int
item PyObject
리턴 void

IsListType() 공개 정적인 메소드

IsListType Method
Returns true if the given object is a Python list.
public static IsListType ( PyObject value ) : bool
value PyObject
리턴 bool

PyList() 공개 메소드

PyList Constructor
Creates a new empty Python list object.
public PyList ( ) : System
리턴 System

PyList() 공개 메소드

PyList Constructor
Creates a new PyList from an existing object reference. Note that the instance assumes ownership of the object reference. The object reference is not checked for type-correctness.
public PyList ( IntPtr ptr ) : System
ptr System.IntPtr
리턴 System

PyList() 공개 메소드

PyList Constructor
Copy constructor - obtain a PyList from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python list object.
public PyList ( PyObject o ) : System
o PyObject
리턴 System

Reverse() 공개 메소드

Reverse Method
Reverse the order of the list object in place.
public Reverse ( ) : void
리턴 void

Sort() 공개 메소드

Sort Method
Sort the list in place.
public Sort ( ) : void
리턴 void