packages.urllib3.packages.ordered_dict

Module Contents

Classes

OrderedDict(self,*args,**kwds) ‘Dictionary that remembers insertion order’
class OrderedDict(*args, **kwds)

‘Dictionary that remembers insertion order’

__init__(*args, **kwds)

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

__setitem__(key, value, dict_setitem=None)

‘od.__setitem__(i, y) <==> od[i]=y’

__delitem__(key, dict_delitem=None)

‘od.__delitem__(y) <==> del od[y]’

__iter__()

‘od.__iter__() <==> iter(od)’

__reversed__()

‘od.__reversed__() <==> reversed(od)’

clear()

‘od.clear() -> None. Remove all items from od.’

popitem(last=True)

od.popitem() -> (k, v), return and remove a (key, value) pair. Pairs are returned in LIFO order if last is true or FIFO order if false.

keys()

‘od.keys() -> list of keys in od’

values()

‘od.values() -> list of values in od’

items()

‘od.items() -> list of (key, value) pairs in od’

iterkeys()

‘od.iterkeys() -> an iterator over the keys in od’

itervalues()

‘od.itervalues -> an iterator over the values in od’

iteritems()

‘od.iteritems -> an iterator over the (key, value) items in od’

update(**kwds)

od.update(E, **F) -> None. Update od from dict/iterable E and F.

If E is a dict instance, does: for k in E: od[k] = E[k] If E has a .keys() method, does: for k in E.keys(): od[k] = E[k] Or if E is an iterable of items, does: for k, v in E: od[k] = v In either case, this is followed by: for k, v in F.items(): od[k] = v

pop(key, default=__marker)

od.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.

setdefault(key, default=None)

‘od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od’

__repr__(_repr_running=dict)

‘od.__repr__() <==> repr(od)’

__reduce__()

‘Return state information for pickling’

copy()

‘od.copy() -> a shallow copy of od’

fromkeys(iterable, value=None)

OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S and values equal to v (which defaults to None).

__eq__(other)

od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive.

__ne__(other)
viewkeys()

“od.viewkeys() -> a set-like object providing a view on od’s keys”

viewvalues()

“od.viewvalues() -> an object providing a view on od’s values”

viewitems()

“od.viewitems() -> a set-like object providing a view on od’s items”