sciquence.data_structures.MultiDict

class sciquence.data_structures.MultiDict(**kwds)[source]

A dictionary, which allows to get multiple elements at once

Examples

>>> md = MultiDict([('a', 1), ('b', 2), ('c', 3)])
>>> print md[['c', 'a']]
(3, 1)
__init__(**kwds)

Initialize an ordered dictionary. The signature is the same as regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary.

Methods

__init__(**kwds) Initialize an ordered dictionary.
clear()
copy()
fromkeys(S[, v]) If not specified, the value defaults to None.
get(k[,d])
has_key(k)
items()
iteritems() od.iteritems -> an iterator over the (key, value) pairs in od
iterkeys()
itervalues() od.itervalues -> an iterator over the values in od
keys()
pop(k[,d]) value.
popitem() Pairs are returned in LIFO order if last is true or FIFO order if false.
setdefault(k[,d])
update([E, ]**F) If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values()
viewitems()
viewkeys()
viewvalues()