circuits.six module

Utilities for writing code that runs on Python 2 and 3

circuits.six.byteindex(x, i)
circuits.six.iterbytes(x)
class circuits.six.MovedModule(name, old, new=None)

Bases: circuits.six._LazyDescr

class circuits.six.MovedAttribute(name, old_mod, new_mod, old_attr=None, new_attr=None)

Bases: circuits.six._LazyDescr

circuits.six.add_move(move)

Add an item to six.moves.

circuits.six.remove_move(name)

Remove item from six.moves.

circuits.six.get_unbound_function(unbound)

Get the function out of a possibly unbound function

circuits.six.callable(obj)
circuits.six.iterkeys(d)

Return an iterator over the keys of a dictionary.

circuits.six.itervalues(d)

Return an iterator over the values of a dictionary.

circuits.six.iteritems(d)

Return an iterator over the (key, value) pairs of a dictionary.

circuits.six.b(s, encoding='utf-8')

Byte literal

circuits.six.u(s, encoding='utf-8')

Text literal

circuits.six.bytes_to_str(b)
circuits.six.reraise(tp, value, tb=None)

Reraise an exception.

circuits.six.with_metaclass(meta, base=<class 'object'>)

Create a base class with a metaclass.