C# Class Python.Runtime.PyDict

Represents a Python dictionary object. See the documentation at http://www.python.org/doc/current/api/dictObjects.html for details.
Inheritance: PyObject
Afficher le fichier Open project: fkarb/pythonnet Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

Clear() public méthode

Clear Method
Clears the dictionary.
public Clear ( ) : void
Résultat void

Copy() public méthode

Copy Method
Returns a copy of the dictionary.
public Copy ( ) : PyDict
Résultat PyDict

HasKey() public méthode

HasKey Method
Returns true if the object key appears in the dictionary.
public HasKey ( PyObject key ) : bool
key PyObject
Résultat bool

HasKey() public méthode

HasKey Method
Returns true if the string key appears in the dictionary.
public HasKey ( string key ) : bool
key string
Résultat bool

IsDictType() public static méthode

IsDictType Method
Returns true if the given object is a Python dictionary.
public static IsDictType ( PyObject value ) : bool
value PyObject
Résultat bool

Items() public méthode

Items Method
Returns a sequence containing the items of the dictionary.
public Items ( ) : PyObject
Résultat PyObject

Keys() public méthode

Keys Method
Returns a sequence containing the keys of the dictionary.
public Keys ( ) : PyObject
Résultat PyObject

PyDict() public méthode

PyDict Constructor
Creates a new Python dictionary object.
public PyDict ( ) : System
Résultat System

PyDict() public méthode

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
Résultat System

PyDict() public méthode

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
Résultat System

Update() public méthode

Update Method
Update the dictionary from another dictionary.
public Update ( PyObject other ) : void
other PyObject
Résultat void

Values() public méthode

Values Method
Returns a sequence containing the values of the dictionary.
public Values ( ) : PyObject
Résultat PyObject