{
    "content": [
        {
            "type": "text",
            "text": "# six (pydoc)\n\n**Summary:** six - Utilities for writing code that runs on Python 2 and 3\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **PACKAGE CONTENTS** (1 lines)\n- **SUBMODULES** (2 lines)\n- **CLASSES** (12 lines) — 8 subsections\n  - class Module_six_moves_urllib (59 lines)\n  - class Module_six_moves_urllib_error (59 lines)\n  - class Module_six_moves_urllib_parse (103 lines)\n  - class Module_six_moves_urllib_request (123 lines)\n  - class Module_six_moves_urllib_response (61 lines)\n  - class Module_six_moves_urllib_robotparser (55 lines)\n  - class MovedAttribute (26 lines)\n  - class MovedModule (28 lines)\n- **FUNCTIONS** (1 lines) — 24 subsections\n  - add_metaclass (2 lines)\n  - add_move (8 lines)\n  - assertCountEqual (1 lines)\n  - assertNotRegex (1 lines)\n  - assertRaisesRegex (1 lines)\n  - assertRegex (1 lines)\n  - b (2 lines)\n  - callable (5 lines)\n  - create_unbound_method (1 lines)\n  - ensure_binary (10 lines)\n  - ensure_str (10 lines)\n  - ensure_text (19 lines)\n  - get_unbound_function (20 lines)\n  - iteritems (2 lines)\n  - iterkeys (2 lines)\n  - iterlists (2 lines)\n  - itervalues (2 lines)\n  - next (15 lines)\n  - python_2_unicode_compatible (6 lines)\n  - raise_from (1 lines)\n  - remove_move (2 lines)\n  - reraise (2 lines)\n  - u (5 lines)\n  - with_metaclass (2 lines)\n- **DATA** (19 lines)\n- **VERSION** (2 lines)\n- **AUTHOR** (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nsix - Utilities for writing code that runs on Python 2 and 3\n\n### PACKAGE CONTENTS\n\n### SUBMODULES\n\nmoves\n\n### CLASSES\n\nbuiltins.module(builtins.object)\nModulesixmovesurllib\nLazyDescr(builtins.object)\nMovedAttribute\nMovedModule\nLazyModule(builtins.module)\nModulesixmovesurlliberror\nModulesixmovesurllibparse\nModulesixmovesurllibrequest\nModulesixmovesurllibresponse\nModulesixmovesurllibrobotparser\n\n#### class Module_six_moves_urllib\n\n|  Modulesixmovesurllib(name, doc=None)\n|\n|  Create a six.moves.urllib namespace that resembles the Python 3 namespace\n|\n|  Method resolution order:\n|      Modulesixmovesurllib\n|      builtins.module\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  dir(self)\n|      dir() -> list\n|      specialized dir() implementation\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {}\n|\n|  error = <module 'six.moves.urllib.error'>\n|\n|  parse = <module 'six.moves.urllibparse'>\n|\n|  request = <module 'six.moves.urllib.request'>\n|\n|  response = <module 'six.moves.urllib.response'>\n|\n|  robotparser = <module 'six.moves.urllib.robotparser'>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.module:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.module:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.module:\n|\n|  dict\n\n#### class Module_six_moves_urllib_error\n\n|  Modulesixmovesurlliberror(name)\n|\n|  Lazy loading of moved objects in six.moves.urlliberror\n|\n|  Method resolution order:\n|      Modulesixmovesurlliberror\n|      LazyModule\n|      builtins.module\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  ContentTooShortError\n|\n|  HTTPError\n|\n|  URLError\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {}\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from LazyModule:\n|\n|  dir(self)\n|      dir() -> list\n|      specialized dir() implementation\n|\n|  init(self, name)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.module:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.module:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.module:\n|\n|  dict\n\n#### class Module_six_moves_urllib_parse\n\n|  Modulesixmovesurllibparse(name)\n|\n|  Lazy loading of moved objects in six.moves.urllibparse\n|\n|  Method resolution order:\n|      Modulesixmovesurllibparse\n|      LazyModule\n|      builtins.module\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  ParseResult\n|\n|  SplitResult\n|\n|  parseqs\n|\n|  parseqsl\n|\n|  quote\n|\n|  quoteplus\n|\n|  splitquery\n|\n|  splittag\n|\n|  splituser\n|\n|  splitvalue\n|\n|  unquote\n|\n|  unquoteplus\n|\n|  unquotetobytes\n|\n|  urldefrag\n|\n|  urlencode\n|\n|  urljoin\n|\n|  urlparse\n|\n|  urlsplit\n|\n|  urlunparse\n|\n|  urlunsplit\n|\n|  usesfragment\n|\n|  usesnetloc\n|\n|  usesparams\n|\n|  usesquery\n|\n|  usesrelative\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {}\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from LazyModule:\n|\n|  dir(self)\n|      dir() -> list\n|      specialized dir() implementation\n|\n|  init(self, name)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.module:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.module:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.module:\n|\n|  dict\n\n#### class Module_six_moves_urllib_request\n\n|  Modulesixmovesurllibrequest(name)\n|\n|  Lazy loading of moved objects in six.moves.urllibrequest\n|\n|  Method resolution order:\n|      Modulesixmovesurllibrequest\n|      LazyModule\n|      builtins.module\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  AbstractBasicAuthHandler\n|\n|  AbstractDigestAuthHandler\n|\n|  BaseHandler\n|\n|  CacheFTPHandler\n|\n|  FTPHandler\n|\n|  FancyURLopener\n|\n|  FileHandler\n|\n|  HTTPBasicAuthHandler\n|\n|  HTTPCookieProcessor\n|\n|  HTTPDefaultErrorHandler\n|\n|  HTTPDigestAuthHandler\n|\n|  HTTPErrorProcessor\n|\n|  HTTPHandler\n|\n|  HTTPPasswordMgr\n|\n|  HTTPPasswordMgrWithDefaultRealm\n|\n|  HTTPRedirectHandler\n|\n|  HTTPSHandler\n|\n|  OpenerDirector\n|\n|  ProxyBasicAuthHandler\n|\n|  ProxyDigestAuthHandler\n|\n|  ProxyHandler\n|\n|  Request\n|\n|  URLopener\n|\n|  UnknownHandler\n|\n|  buildopener\n|\n|  getproxies\n|\n|  installopener\n|\n|  parsehttplist\n|\n|  parsekeqvlist\n|\n|  pathname2url\n|\n|  proxybypass\n|\n|  url2pathname\n|\n|  urlcleanup\n|\n|  urlopen\n|\n|  urlretrieve\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {}\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from LazyModule:\n|\n|  dir(self)\n|      dir() -> list\n|      specialized dir() implementation\n|\n|  init(self, name)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.module:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.module:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.module:\n|\n|  dict\n\n#### class Module_six_moves_urllib_response\n\n|  Modulesixmovesurllibresponse(name)\n|\n|  Lazy loading of moved objects in six.moves.urllibresponse\n|\n|  Method resolution order:\n|      Modulesixmovesurllibresponse\n|      LazyModule\n|      builtins.module\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  addbase\n|\n|  addclosehook\n|\n|  addinfo\n|\n|  addinfourl\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {}\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from LazyModule:\n|\n|  dir(self)\n|      dir() -> list\n|      specialized dir() implementation\n|\n|  init(self, name)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.module:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.module:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.module:\n|\n|  dict\n\n#### class Module_six_moves_urllib_robotparser\n\n|  Modulesixmovesurllibrobotparser(name)\n|\n|  Lazy loading of moved objects in six.moves.urllibrobotparser\n|\n|  Method resolution order:\n|      Modulesixmovesurllibrobotparser\n|      LazyModule\n|      builtins.module\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  RobotFileParser\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {}\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from LazyModule:\n|\n|  dir(self)\n|      dir() -> list\n|      specialized dir() implementation\n|\n|  init(self, name)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.module:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.module:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.module:\n|\n|  dict\n\n#### class MovedAttribute\n\n|  MovedAttribute(name, oldmod, newmod, oldattr=None, newattr=None)\n|\n|  Method resolution order:\n|      MovedAttribute\n|      LazyDescr\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, name, oldmod, newmod, oldattr=None, newattr=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from LazyDescr:\n|\n|  get(self, obj, tp)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from LazyDescr:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n#### class MovedModule\n\n|  MovedModule(name, old, new=None)\n|\n|  Method resolution order:\n|      MovedModule\n|      LazyDescr\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  getattr(self, attr)\n|\n|  init(self, name, old, new=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from LazyDescr:\n|\n|  get(self, obj, tp)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from LazyDescr:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n### FUNCTIONS\n\n#### add_metaclass\n\nClass decorator for creating a class with a metaclass.\n\n#### add_move\n\nAdd an item to six.moves.\n\nadvanceiterator = next(...)\nnext(iterator[, default])\n\nReturn the next item from the iterator. If default is given and the iterator\nis exhausted, it is returned instead of raising StopIteration.\n\n#### assertCountEqual\n\n#### assertNotRegex\n\n#### assertRaisesRegex\n\n#### assertRegex\n\n#### b\n\nByte literal\n\n#### callable\n\nReturn whether the object is callable (i.e., some kind of function).\n\nNote that classes are callable, as are instances of classes with a\ncall() method.\n\n#### create_unbound_method\n\n#### ensure_binary\n\nCoerce s to six.binarytype.\n\nFor Python 2:\n- `unicode` -> encoded to `str`\n- `str` -> `str`\n\nFor Python 3:\n- `str` -> encoded to `bytes`\n- `bytes` -> `bytes`\n\n#### ensure_str\n\nCoerce *s* to `str`.\n\nFor Python 2:\n- `unicode` -> encoded to `str`\n- `str` -> `str`\n\nFor Python 3:\n- `str` -> `str`\n- `bytes` -> decoded to `str`\n\n#### ensure_text\n\nCoerce *s* to six.texttype.\n\nFor Python 2:\n- `unicode` -> `unicode`\n- `str` -> `unicode`\n\nFor Python 3:\n- `str` -> `str`\n- `bytes` -> decoded to `str`\n\nexec = exec(source, globals=None, locals=None, /)\nExecute the given source in the context of globals and locals.\n\nThe source may be a string representing one or more Python statements\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it.\n\n#### get_unbound_function\n\nGet the function out of a possibly unbound function\n\nindexbytes = getitem(a, b, /)\nSame as a[b].\n\nint2byte = pack(...) method of struct.Struct instance\nS.pack(v1, v2, ...) -> bytes\n\nReturn a bytes object containing values v1, v2, ... packed according\nto the format string S.format.  See help(struct) for more on format\nstrings.\n\niterbytes = iter(...)\niter(iterable) -> iterator\niter(callable, sentinel) -> iterator\n\nGet an iterator from an object.  In the first form, the argument must\nsupply its own iterator, or be a sequence.\nIn the second form, the callable is called until it returns the sentinel.\n\n#### iteritems\n\nReturn an iterator over the (key, value) pairs of a dictionary.\n\n#### iterkeys\n\nReturn an iterator over the keys of a dictionary.\n\n#### iterlists\n\nReturn an iterator over the (key, [values]) pairs of a dictionary.\n\n#### itervalues\n\nReturn an iterator over the values of a dictionary.\n\n#### next\n\nnext(iterator[, default])\n\nReturn the next item from the iterator. If default is given and the iterator\nis exhausted, it is returned instead of raising StopIteration.\n\nprint = print(...)\nprint(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n\nPrints the values to a stream, or to sys.stdout by default.\nOptional keyword arguments:\nfile:  a file-like object (stream); defaults to the current sys.stdout.\nsep:   string inserted between values, default a space.\nend:   string appended after the last value, default a newline.\nflush: whether to forcibly flush the stream.\n\n#### python_2_unicode_compatible\n\nA class decorator that defines unicode and str methods under Python 2.\nUnder Python 3 it does nothing.\n\nTo support Python 2 and 3 with a single code base, define a str method\nreturning text and apply this decorator to the class.\n\n#### raise_from\n\n#### remove_move\n\nRemove item from six.moves.\n\n#### reraise\n\nReraise an exception.\n\n#### u\n\nText literal\n\nunichr = chr(i, /)\nReturn a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.\n\n#### with_metaclass\n\nCreate a base class with a metaclass.\n\n### DATA\n\nMAXSIZE = 9223372036854775807\nPY2 = False\nPY3 = True\nPY34 = True\nabsoluteimport = Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0...\nbyte2int = operator.itemgetter(0)\nclasstypes = (<class 'type'>,)\ngetfunctionclosure = operator.attrgetter('closure')\ngetfunctioncode = operator.attrgetter('code')\ngetfunctiondefaults = operator.attrgetter('defaults')\ngetfunctionglobals = operator.attrgetter('globals')\ngetmethodfunction = operator.attrgetter('func')\ngetmethodself = operator.attrgetter('self')\nintegertypes = (<class 'int'>,)\nstringtypes = (<class 'str'>,)\nviewitems = operator.methodcaller('items')\nviewkeys = operator.methodcaller('keys')\nviewvalues = operator.methodcaller('values')\n\n### VERSION\n\n1.16.0\n\n### AUTHOR\n\nBenjamin Peterson <benjamin@python.org>\n\n### FILE\n\n/usr/lib/python3/dist-packages/six.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "six",
        "section": "",
        "mode": "pydoc",
        "summary": "six - Utilities for writing code that runs on Python 2 and 3",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "PACKAGE CONTENTS",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "SUBMODULES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 12,
                "subsections": [
                    {
                        "name": "class Module_six_moves_urllib",
                        "lines": 59
                    },
                    {
                        "name": "class Module_six_moves_urllib_error",
                        "lines": 59
                    },
                    {
                        "name": "class Module_six_moves_urllib_parse",
                        "lines": 103
                    },
                    {
                        "name": "class Module_six_moves_urllib_request",
                        "lines": 123
                    },
                    {
                        "name": "class Module_six_moves_urllib_response",
                        "lines": 61
                    },
                    {
                        "name": "class Module_six_moves_urllib_robotparser",
                        "lines": 55
                    },
                    {
                        "name": "class MovedAttribute",
                        "lines": 26
                    },
                    {
                        "name": "class MovedModule",
                        "lines": 28
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "add_metaclass",
                        "lines": 2
                    },
                    {
                        "name": "add_move",
                        "lines": 8
                    },
                    {
                        "name": "assertCountEqual",
                        "lines": 1
                    },
                    {
                        "name": "assertNotRegex",
                        "lines": 1
                    },
                    {
                        "name": "assertRaisesRegex",
                        "lines": 1
                    },
                    {
                        "name": "assertRegex",
                        "lines": 1
                    },
                    {
                        "name": "b",
                        "lines": 2
                    },
                    {
                        "name": "callable",
                        "lines": 5
                    },
                    {
                        "name": "create_unbound_method",
                        "lines": 1
                    },
                    {
                        "name": "ensure_binary",
                        "lines": 10
                    },
                    {
                        "name": "ensure_str",
                        "lines": 10
                    },
                    {
                        "name": "ensure_text",
                        "lines": 19
                    },
                    {
                        "name": "get_unbound_function",
                        "lines": 20
                    },
                    {
                        "name": "iteritems",
                        "lines": 2
                    },
                    {
                        "name": "iterkeys",
                        "lines": 2
                    },
                    {
                        "name": "iterlists",
                        "lines": 2
                    },
                    {
                        "name": "itervalues",
                        "lines": 2
                    },
                    {
                        "name": "next",
                        "lines": 15
                    },
                    {
                        "name": "python_2_unicode_compatible",
                        "lines": 6
                    },
                    {
                        "name": "raise_from",
                        "lines": 1
                    },
                    {
                        "name": "remove_move",
                        "lines": 2
                    },
                    {
                        "name": "reraise",
                        "lines": 2
                    },
                    {
                        "name": "u",
                        "lines": 5
                    },
                    {
                        "name": "with_metaclass",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}