module documentation

Utilities for writing code that runs on Python 2 and 3

Class Module_six_moves_urllib Create a six.moves.urllib namespace that resembles the Python 3 namespace
Class Module_six_moves_urllib_error Lazy loading of moved objects in six.moves.urllib_error
Class Module_six_moves_urllib_parse Lazy loading of moved objects in six.moves.urllib_parse
Class Module_six_moves_urllib_request Lazy loading of moved objects in six.moves.urllib_request
Class Module_six_moves_urllib_response Lazy loading of moved objects in six.moves.urllib_response
Class Module_six_moves_urllib_robotparser Lazy loading of moved objects in six.moves.urllib_robotparser
Class MovedAttribute Undocumented
Class MovedModule Undocumented
Function add_metaclass Class decorator for creating a class with a metaclass.
Function add_move Add an item to six.moves.
Function assertCountEqual Undocumented
Function assertNotRegex Undocumented
Function assertRaisesRegex Undocumented
Function assertRegex Undocumented
Function b Undocumented
Function create_unbound_method Undocumented
Function ensure_binary Coerce **s** to six.binary_type.
Function ensure_str Coerce *s* to `str`.
Function ensure_text Coerce *s* to six.text_type.
Function get_unbound_function Undocumented
Function iteritems Undocumented
Function iterkeys Undocumented
Function iterlists Undocumented
Function itervalues Undocumented
Function print_ Undocumented
Function python_2_unicode_compatible A class decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing.
Function remove_move Remove item from six.moves.
Function reraise Undocumented
Function u Undocumented
Function with_metaclass Create a base class with a metaclass.
Function wraps Undocumented
Constant PY2 Undocumented
Constant PY3 Undocumented
Constant PY34 Undocumented
Variable __author__ Undocumented
Variable __path__ Undocumented
Variable __version__ Undocumented
Variable byte2int Undocumented
Variable class_types Undocumented
Variable exec_ Undocumented
Variable get_function_closure Undocumented
Variable get_function_code Undocumented
Variable get_function_defaults Undocumented
Variable get_function_globals Undocumented
Variable get_method_function Undocumented
Variable get_method_self Undocumented
Variable int2byte Undocumented
Variable integer_types Undocumented
Variable moves Undocumented
Variable string_types Undocumented
Variable viewitems Undocumented
Variable viewkeys Undocumented
Variable viewvalues Undocumented
Class _LazyDescr Undocumented
Class _LazyModule Undocumented
Class _MovedItems Lazy loading of moved objects
Class _SixMetaPathImporter A meta path importer to import six.moves and its submodules.
Function _add_doc Add documentation to a function.
Function _import_module Import module, returning the module after the last dot.
Function _update_wrapper Undocumented
Variable _assertCountEqual Undocumented
Variable _assertNotRegex Undocumented
Variable _assertRaisesRegex Undocumented
Variable _assertRegex Undocumented
Variable _func_closure Undocumented
Variable _func_code Undocumented
Variable _func_defaults Undocumented
Variable _func_globals Undocumented
Variable _importer Undocumented
Variable _meth_func Undocumented
Variable _meth_self Undocumented
Variable _moved_attributes Undocumented
Variable _urllib_error_moved_attributes Undocumented
Variable _urllib_parse_moved_attributes Undocumented
Variable _urllib_request_moved_attributes Undocumented
Variable _urllib_response_moved_attributes Undocumented
Variable _urllib_robotparser_moved_attributes Undocumented
def add_metaclass(metaclass): (source)

Class decorator for creating a class with a metaclass.

def add_move(move): (source)

Add an item to six.moves.

def assertCountEqual(self, *args, **kwargs): (source)

Undocumented

def assertNotRegex(self, *args, **kwargs): (source)

Undocumented

def assertRaisesRegex(self, *args, **kwargs): (source)

Undocumented

def assertRegex(self, *args, **kwargs): (source)

Undocumented

Undocumented

def create_unbound_method(func, cls): (source)

Undocumented

def ensure_binary(s, encoding='utf-8', errors='strict'): (source)

Coerce **s** to six.binary_type. For Python 2: - `unicode` -> encoded to `str` - `str` -> `str` For Python 3: - `str` -> encoded to `bytes` - `bytes` -> `bytes`

def ensure_str(s, encoding='utf-8', errors='strict'): (source)

Coerce *s* to `str`. For Python 2: - `unicode` -> encoded to `str` - `str` -> `str` For Python 3: - `str` -> `str` - `bytes` -> decoded to `str`

def ensure_text(s, encoding='utf-8', errors='strict'): (source)

Coerce *s* to six.text_type. For Python 2: - `unicode` -> `unicode` - `str` -> `unicode` For Python 3: - `str` -> `str` - `bytes` -> decoded to `str`

def get_unbound_function(unbound): (source)

Undocumented

def iteritems(d, **kw): (source)

Undocumented

def iterkeys(d, **kw): (source)

Undocumented

def iterlists(d, **kw): (source)

Undocumented

def itervalues(d, **kw): (source)

Undocumented

def print_(*args, **kwargs): (source)

Undocumented

def python_2_unicode_compatible(klass): (source)

A class decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing. To support Python 2 and 3 with a single code base, define a __str__ method returning text and apply this decorator to the class.

def remove_move(name): (source)

Remove item from six.moves.

def reraise(tp, value, tb=None): (source)

Undocumented

Undocumented

def with_metaclass(meta, *bases): (source)

Create a base class with a metaclass.

def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES): (source)

Undocumented

Undocumented

Value
(sys.version_info[0] == 2)

Undocumented

Value
(sys.version_info[0] == 3)

Undocumented

Value
(sys.version_info[0:2] >= (3, 4))
__author__: str = (source)

Undocumented

__path__: list = (source)

Undocumented

__version__: str = (source)

Undocumented

byte2int = (source)

Undocumented

class_types = (source)

Undocumented

Undocumented

get_function_closure = (source)

Undocumented

get_function_code = (source)

Undocumented

get_function_defaults = (source)

Undocumented

get_function_globals = (source)

Undocumented

get_method_function = (source)

Undocumented

get_method_self = (source)

Undocumented

int2byte = (source)

Undocumented

integer_types = (source)

Undocumented

Undocumented

string_types = (source)

Undocumented

viewitems = (source)

Undocumented

viewkeys = (source)

Undocumented

viewvalues = (source)

Undocumented

def _add_doc(func, doc): (source)

Add documentation to a function.

def _import_module(name): (source)

Import module, returning the module after the last dot.

def _update_wrapper(wrapper, wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES): (source)

Undocumented

_assertCountEqual: str = (source)

Undocumented

_assertNotRegex: str = (source)

Undocumented

_assertRaisesRegex: str = (source)

Undocumented

_assertRegex: str = (source)

Undocumented

_func_closure: str = (source)

Undocumented

_func_code: str = (source)

Undocumented

_func_defaults: str = (source)

Undocumented

_func_globals: str = (source)

Undocumented

_importer = (source)

Undocumented

_meth_func: str = (source)

Undocumented

_meth_self: str = (source)

Undocumented

_moved_attributes = (source)

Undocumented

_urllib_error_moved_attributes = (source)

Undocumented

_urllib_parse_moved_attributes = (source)

Undocumented

_urllib_request_moved_attributes = (source)

Undocumented

_urllib_response_moved_attributes = (source)

Undocumented

_urllib_robotparser_moved_attributes = (source)

Undocumented