C# Class IronPython.Runtime.DictionaryOps

Provides both helpers for implementing Python dictionaries as well as providing public methods that should be exposed on all dictionary types. Currently these are published on IDictionary<object, object>
Datei anzeigen Open project: jschementi/iron Class Usage Examples

Public Methods

Method Description
__repr__ ( CodeContext context, object>.IDictionary self ) : string
get ( PythonDictionary self, object key ) : object
get ( PythonDictionary self, object key, object defaultValue ) : object
has_key ( object>.IDictionary self, object key ) : bool
items ( object>.IDictionary self ) : List
iteritems ( object>.IDictionary self ) : IEnumerator
iterkeys ( object>.IDictionary self ) : IEnumerator
keys ( object>.IDictionary self ) : List
pop ( PythonDictionary self, object key ) : object
pop ( PythonDictionary self, object key, object defaultValue ) : object
popitem ( object>.IDictionary self ) : PythonTuple
setdefault ( PythonDictionary self, object key ) : object
setdefault ( PythonDictionary self, object key, object defaultValue ) : object
update ( CodeContext context, PythonDictionary self, object b ) : void

Private Methods

Method Description
AddKeyValue ( PythonDictionary self, object o ) : bool
CompareTo ( CodeContext context, object>.IDictionary left, object>.IDictionary right ) : int
CompareToWorker ( CodeContext context, object>.IDictionary left, List ritems ) : int
SlowUpdate ( CodeContext context, PythonDictionary self, object b ) : void
TryGetValueVirtual ( CodeContext context, PythonDictionary self, object key, object &DefaultGetItem, object &value ) : bool

Method Details

__repr__() public static method

public static __repr__ ( CodeContext context, object>.IDictionary self ) : string
context CodeContext
self object>.IDictionary
return string

get() public static method

public static get ( PythonDictionary self, object key ) : object
self PythonDictionary
key object
return object

get() public static method

public static get ( PythonDictionary self, object key, object defaultValue ) : object
self PythonDictionary
key object
defaultValue object
return object

has_key() public static method

public static has_key ( object>.IDictionary self, object key ) : bool
self object>.IDictionary
key object
return bool

items() public static method

public static items ( object>.IDictionary self ) : List
self object>.IDictionary
return List

iteritems() public static method

public static iteritems ( object>.IDictionary self ) : IEnumerator
self object>.IDictionary
return IEnumerator

iterkeys() public static method

public static iterkeys ( object>.IDictionary self ) : IEnumerator
self object>.IDictionary
return IEnumerator

keys() public static method

public static keys ( object>.IDictionary self ) : List
self object>.IDictionary
return List

pop() public static method

public static pop ( PythonDictionary self, object key ) : object
self PythonDictionary
key object
return object

pop() public static method

public static pop ( PythonDictionary self, object key, object defaultValue ) : object
self PythonDictionary
key object
defaultValue object
return object

popitem() public static method

public static popitem ( object>.IDictionary self ) : PythonTuple
self object>.IDictionary
return PythonTuple

setdefault() public static method

public static setdefault ( PythonDictionary self, object key ) : object
self PythonDictionary
key object
return object

setdefault() public static method

public static setdefault ( PythonDictionary self, object key, object defaultValue ) : object
self PythonDictionary
key object
defaultValue object
return object

update() public static method

public static update ( CodeContext context, PythonDictionary self, object b ) : void
context CodeContext
self PythonDictionary
b object
return void