b3j0f.utils.version module

Module which provides variables and constants in order to ease developments among several python versions and platforms.

b3j0f.utils.version.PY26 = False

python2.6.

b3j0f.utils.version.PY27 = True

python2.7.

b3j0f.utils.version.PYPY = False

pypy.

b3j0f.utils.version.CPYTHON = True

cpython.

b3j0f.utils.version.JYTHON = False

jython.

b3j0f.utils.version.IRONPYTHON = False

IronPython.

class b3j0f.utils.version.OrderedDict(*args, **kwds)[source]

Bases: dict

Dictionary that remembers insertion order

clear() → None. Remove all items from od.[source]
copy() → a shallow copy of od[source]
classmethod fromkeys(S[, v]) → New ordered dictionary with keys from S.[source]

If not specified, the value defaults to None.

items() → list of (key, value) pairs in od[source]
iteritems()[source]

od.iteritems -> an iterator over the (key, value) pairs in od

iterkeys() → an iterator over the keys in od[source]
itervalues()[source]

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

keys() → list of keys in od[source]
pop(k[, d]) → v, remove specified key and return the corresponding[source]

value. If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() → (k, v), return and remove a (key, value) pair.[source]

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[source]
update([E, ]**F) → None. Update D from mapping/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, v in F.items(): D[k] = v

values() → list of values in od[source]
viewitems() → a set-like object providing a view on od's items[source]
viewkeys() → a set-like object providing a view on od's keys[source]
viewvalues() → an object providing a view on od's values[source]
b3j0f.utils.version.getcallargs(func, *positional, **named)[source]

Get the mapping of arguments to values.

A dict is returned, with keys the function argument names (including the names of the * and ** arguments, if any), and values the respective bound values from ‘positional’ and ‘named’.