| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
dict --+
|
OrderedDict
OrderedDict is a simple ordered dictionary. The keys(), items(), __iter__(), and other methods all return the keys in the order they were added to the dictionary. Note that re-adding a key (i.e., replacing a key with a new value) does not change the original order.
An OrderedDict object is instantiated with exactly the same parameters as a dict object. The methods it provides are identical to those in the dict type and are not documented here.
|
|||
new empty dictionary |
|
||
|
|||
|
|||
|
|||
|
|||
| list of D's keys |
|
||
| list of D's (key, value) pairs, as 2-tuples |
|
||
| list of D's values |
|
||
| an iterator over the (key, value) items of D |
|
||
| an iterator over the keys of D |
|
||
| None |
|
||
| v, remove specified key and return the corresponding value |
|
||
| (k, v), remove and return some (key, value) pair as a |
|
||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
x[i]=y
|
del x[y]
|
iter(x)
|
str(x)
|
|
|
|
|
|
Update D from dict/iterable E and 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 in F: D[k] = F[k]
|
If key is not found, d is returned if given, otherwise KeyError is raised
|
2-tuple; but raise KeyError if D is empty.
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Mon Mar 14 15:21:05 2016 | http://epydoc.sourceforge.net |