OrderedDict¶
-
class
metpy.io.cdm.
OrderedDict
[source]¶ Dictionary that remembers insertion order
Methods Summary
clear
(() -> None. Remove all items from od.)copy
(() -> a shallow copy of od)fromkeys
((S[, …)If not specified, the value defaults to None. get
((k[,d]) -> D[k] if k in D, …)items
keys
move_to_end
Move an existing element to the end (or beginning if last==False). pop
((k[,d]) -> v, …)value. If key is not found, d is returned if given, otherwise KeyError popitem
Remove and return a (key, value) pair from the dictionary. setdefault
((k[,d]) -> od.get(k,d), …)update
values
Methods Documentation
-
clear
() → None. Remove all items from od.¶
-
copy
() → a shallow copy of od¶
-
fromkeys
(S[, v]) → New ordered dictionary with keys from S.¶ If not specified, the value defaults to None.
-
get
(k[, d]) → D[k] if k in D, else d. d defaults to None.¶
-
items
()¶
-
keys
()¶
-
move_to_end
()¶ Move an existing element to the end (or beginning if last==False).
Raises KeyError if the element does not exist. When last=True, acts like a fast version of self[key]=self.pop(key).
-
pop
(k[, d]) → v, remove specified key and return the corresponding¶ value. If key is not found, d is returned if given, otherwise KeyError is raised.
-
popitem
()¶ Remove and return a (key, value) pair from the dictionary.
Pairs are returned in LIFO order if last is true or FIFO order if false.
-
setdefault
(k[, d]) → od.get(k,d), also set od[k]=d if k not in od¶
-
update
()¶
-
values
()¶
-