|
webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Classes | |
| class | _LazyDescr |
| class | _LazyModule |
| class | _MovedItems |
| class | _SixMetaPathImporter |
| class | Iterator |
| class | Module_six_moves_urllib |
| class | Module_six_moves_urllib_error |
| class | Module_six_moves_urllib_parse |
| class | Module_six_moves_urllib_request |
| class | Module_six_moves_urllib_response |
| class | Module_six_moves_urllib_robotparser |
| class | MovedAttribute |
| class | MovedModule |
| class | X |
Functions | |
| def | add_move (move) |
| def | remove_move (name) |
| def | advance_iterator (it) |
| def | callable (obj) |
| def | get_unbound_function (unbound) |
| def | create_unbound_method (func, cls) |
| def | create_bound_method (func, obj) |
| def | iterkeys (d, kw) |
| def | itervalues (d, kw) |
| def | iteritems (d, kw) |
| def | iterlists (d, kw) |
| def | b (s) |
| def | u (s) |
| def | byte2int (bs) |
| def | indexbytes (buf, i) |
| def | assertCountEqual (self, args, kwargs) |
| def | assertRaisesRegex (self, args, kwargs) |
| def | assertRegex (self, args, kwargs) |
| def | reraise (tp, value, tb=None) |
| def | exec_ (_code_, _globs_=None, _locs_=None) |
| def | raise_from (value, from_value) |
| def | print_ (args, kwargs) |
| def | wraps (wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES) |
| def | with_metaclass (meta, bases) |
| def | add_metaclass (metaclass) |
| def | python_2_unicode_compatible (klass) |
Variables | |
| int | PY2 = 2 |
| int | PY3 = 3 |
| tuple | PY34 = (3, 4) |
| string_types = str, | |
| integer_types = int, | |
| class_types = type, | |
| text_type = str | |
| binary_type = bytes | |
| MAXSIZE = sys.maxsize | |
| moves = _MovedItems(__name__ + ".moves") | |
| advance_iterator = next | |
| next = advance_iterator | |
| callable = callable | |
| create_bound_method = types.MethodType | |
| Iterator = object | |
| get_method_function = operator.attrgetter(_meth_func) | |
| get_method_self = operator.attrgetter(_meth_self) | |
| get_function_closure = operator.attrgetter(_func_closure) | |
| get_function_code = operator.attrgetter(_func_code) | |
| get_function_defaults = operator.attrgetter(_func_defaults) | |
| get_function_globals = operator.attrgetter(_func_globals) | |
| viewkeys = operator.methodcaller("keys") | |
| viewvalues = operator.methodcaller("values") | |
| viewitems = operator.methodcaller("items") | |
| unichr = chr | |
| int2byte = struct.Struct(">B").pack | |
| byte2int = operator.itemgetter(0) | |
| indexbytes = operator.getitem | |
| iterbytes = iter | |
| StringIO = io.StringIO | |
| BytesIO = io.BytesIO | |
| exec_ = getattr(moves.builtins, "exec") | |
| print_ = getattr(moves.builtins, "print", None) | |
| def | wraps = functools.wraps |
| submodule_search_locations | |
Utilities for writing code that runs on Python 2 and 3
| def six.add_metaclass | ( | metaclass | ) |
Class decorator for creating a class with a metaclass.
| def six.add_move | ( | move | ) |
Add an item to six.moves.
| def six.advance_iterator | ( | it | ) |
| def six.assertCountEqual | ( | self, | |
| args, | |||
| kwargs | |||
| ) |
| def six.assertRaisesRegex | ( | self, | |
| args, | |||
| kwargs | |||
| ) |
| def six.assertRegex | ( | self, | |
| args, | |||
| kwargs | |||
| ) |
| def six.b | ( | s | ) |
| def six.byte2int | ( | bs | ) |
| def six.callable | ( | obj | ) |
| def six.create_bound_method | ( | func, | |
| obj | |||
| ) |
| def six.create_unbound_method | ( | func, | |
| cls | |||
| ) |
| def six.exec_ | ( | _code_, | |
_globs_ = None, |
|||
_locs_ = None |
|||
| ) |
Execute code in a namespace.
| def six.get_unbound_function | ( | unbound | ) |
| def six.indexbytes | ( | buf, | |
| i | |||
| ) |
| def six.iteritems | ( | d, | |
| kw | |||
| ) |
| def six.iterkeys | ( | d, | |
| kw | |||
| ) |
| def six.iterlists | ( | d, | |
| kw | |||
| ) |
| def six.itervalues | ( | d, | |
| kw | |||
| ) |
| def six.print_ | ( | args, | |
| kwargs | |||
| ) |
The new-style print function for Python 2.4 and 2.5.
| def six.python_2_unicode_compatible | ( | klass | ) |
A 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 six.raise_from | ( | value, | |
| from_value | |||
| ) |
| def six.remove_move | ( | name | ) |
Remove item from six.moves.
| def six.reraise | ( | tp, | |
| value, | |||
tb = None |
|||
| ) |
| def six.u | ( | s | ) |
| def six.with_metaclass | ( | meta, | |
| bases | |||
| ) |
Create a base class with a metaclass.
| def six.wraps | ( | wrapped, | |
assigned = functools.WRAPPER_ASSIGNMENTS, |
|||
updated = functools.WRAPPER_UPDATES |
|||
| ) |
| six.advance_iterator = next |
| six.binary_type = bytes |
| six.byte2int = operator.itemgetter(0) |
| six.BytesIO = io.BytesIO |
| six.callable = callable |
| tuple six.class_types = type, |
| six.create_bound_method = types.MethodType |
| six.exec_ = getattr(moves.builtins, "exec") |
| six.get_function_closure = operator.attrgetter(_func_closure) |
| six.get_function_code = operator.attrgetter(_func_code) |
| six.get_function_defaults = operator.attrgetter(_func_defaults) |
| six.get_function_globals = operator.attrgetter(_func_globals) |
| six.get_method_function = operator.attrgetter(_meth_func) |
| six.get_method_self = operator.attrgetter(_meth_self) |
| six.indexbytes = operator.getitem |
| six.int2byte = struct.Struct(">B").pack |
| tuple six.integer_types = int, |
| six.iterbytes = iter |
| six.MAXSIZE = sys.maxsize |
| six.moves = _MovedItems(__name__ + ".moves") |
| six.next = advance_iterator |
| def six.print_ = getattr(moves.builtins, "print", None) |
| int six.PY2 = 2 |
| int six.PY3 = 3 |
| tuple six.PY34 = (3, 4) |
| six.string_types = str, |
| six.StringIO = io.StringIO |
| six.submodule_search_locations |
| six.text_type = str |
| six.unichr = chr |
| six.viewitems = operator.methodcaller("items") |
| six.viewkeys = operator.methodcaller("keys") |
| six.viewvalues = operator.methodcaller("values") |
| def six.wraps = functools.wraps |
1.8.13