circuits.six module
Utilities for writing code that runs on Python 2 and 3
-
circuits.six.byteindex(data, index)
-
circuits.six.iterbytes(data)
-
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.create_bound_method(function, instance)
-
circuits.six.get_unbound_function(unbound)
Get the function out of a possibly unbound function
-
class circuits.six.Iterator
Bases: object
-
next()
-
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(s)
-
circuits.six.reraise(tp, value, tb=None)
Reraise an exception.
-
circuits.six.exec_(code, globs=None, locs=None)
Execute code in a namespace.
-
circuits.six.print_(*args, **kwargs)
The new-style print function.
-
circuits.six.with_metaclass(meta, base=<type 'object'>)
Create a base class with a metaclass.