1.1.2.7. gnr.core.gnrdict – Dictionaries

Last page update: November 23, 2011

Classes:

External methods:

Complete reference:

1.1.2.7.2. GnrNumericDict

there is no public method.

1.1.2.7.3. External methods

These methods don’t belong to any class.

1.1.2.7.4. gnr.core.gnrdict - The complete reference list

class gnr.core.gnrdict.GnrDict(*args, **kwargs)

An ordered dictionary

clear()

TODO

copy()

TODO

get(label, default=None)

TODO

Parameters:
  • label – TODO
  • default – TODO
index(value)

TODO

items()

TODO

iteritems()

TODO

iterkeys()

TODO

itervalues()

TODO

keys()

TODO

pop(key, dflt=None)

TODO

Parameters:
  • key – TODO
  • dflt – TODO
popitem()

TODO

reverse()

TODO

setdefault(key, d=None)

TODO

Parameters:
  • key – TODO
  • d – TODO
sort(cmpfunc=None)

TODO

Parameters:cmpfunc – TODO
update(o, removeNone=False)

TODO

Parameters:
  • o – TODO
  • removeNone – TODO
values()

TODO

class gnr.core.gnrdict.GnrNumericDict(*args, **kwargs)

TODO

gnr.core.gnrdict.dictExtract(mydict, prefix, pop=False, slice_prefix=True)

Return a dict of the items with keys starting with prefix.

Parameters:
  • mydict – sourcedict
  • prefix – the prefix of the items you need to extract
  • pop – removes the items from the sourcedict
  • slice_prefix – shortens the keys of the output dict removing the prefix
Returns:

a dict of the items with keys starting with prefix