C# Класс Python.Runtime.PyDict

Represents a Python dictionary object. See the documentation at http://www.python.org/doc/current/api/dictObjects.html for details.
Наследование: PyObject
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Clear ( ) : void

Clear Method

Clears the dictionary.

Copy ( ) : PyDict

Copy Method

Returns a copy of the dictionary.

HasKey ( PyObject key ) : bool

HasKey Method

Returns true if the object key appears in the dictionary.

HasKey ( string key ) : bool

HasKey Method

Returns true if the string key appears in the dictionary.

IsDictType ( PyObject value ) : bool

IsDictType Method

Returns true if the given object is a Python dictionary.

Items ( ) : PyObject

Items Method

Returns a sequence containing the items of the dictionary.

Keys ( ) : PyObject

Keys Method

Returns a sequence containing the keys of the dictionary.

PyDict ( ) : System

PyDict Constructor

Creates a new Python dictionary object.

PyDict ( IntPtr ptr ) : System

PyDict Constructor

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

PyDict ( PyObject o ) : System

PyDict Constructor

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

Update ( PyObject other ) : void

Update Method

Update the dictionary from another dictionary.

Values ( ) : PyObject

Values Method

Returns a sequence containing the values of the dictionary.

Описание методов

Clear() публичный Метод

Clear Method
Clears the dictionary.
public Clear ( ) : void
Результат void

Copy() публичный Метод

Copy Method
Returns a copy of the dictionary.
public Copy ( ) : PyDict
Результат PyDict

HasKey() публичный Метод

HasKey Method
Returns true if the object key appears in the dictionary.
public HasKey ( PyObject key ) : bool
key PyObject
Результат bool

HasKey() публичный Метод

HasKey Method
Returns true if the string key appears in the dictionary.
public HasKey ( string key ) : bool
key string
Результат bool

IsDictType() публичный статический Метод

IsDictType Method
Returns true if the given object is a Python dictionary.
public static IsDictType ( PyObject value ) : bool
value PyObject
Результат bool

Items() публичный Метод

Items Method
Returns a sequence containing the items of the dictionary.
public Items ( ) : PyObject
Результат PyObject

Keys() публичный Метод

Keys Method
Returns a sequence containing the keys of the dictionary.
public Keys ( ) : PyObject
Результат PyObject

PyDict() публичный Метод

PyDict Constructor
Creates a new Python dictionary object.
public PyDict ( ) : System
Результат System

PyDict() публичный Метод

PyDict Constructor
Creates a new PyDict 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 PyDict ( IntPtr ptr ) : System
ptr System.IntPtr
Результат System

PyDict() публичный Метод

PyDict Constructor
Copy constructor - obtain a PyDict from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python dictionary object.
public PyDict ( PyObject o ) : System
o PyObject
Результат System

Update() публичный Метод

Update Method
Update the dictionary from another dictionary.
public Update ( PyObject other ) : void
other PyObject
Результат void

Values() публичный Метод

Values Method
Returns a sequence containing the values of the dictionary.
public Values ( ) : PyObject
Результат PyObject