]> granicus.if.org Git - python/commitdiff
Update pydoc topics for v3.6.2rc1
authorNed Deily <nad@python.org>
Sat, 17 Jun 2017 08:37:19 +0000 (04:37 -0400)
committerNed Deily <nad@python.org>
Sat, 17 Jun 2017 08:37:19 +0000 (04:37 -0400)
Lib/pydoc_data/topics.py

index 2caab630978fa07acbd70d2421eb12c97573a872..015afb30b45e55fca8901b0fb3bd71ada661a31c 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Sat Mar  4 12:14:44 2017
+# Autogenerated by Sphinx on Sat Jun 17 04:32:54 2017
 topics = {'assert': 'The "assert" statement\n'
            '**********************\n'
            '\n'
@@ -1300,7 +1300,7 @@ topics = {'assert': 'The "assert" statement\n'
           '   2 1\n'
           '   >>> f(a=1, *(2,))\n'
           '   Traceback (most recent call last):\n'
-          '     File "<stdin>", line 1, in ?\n'
+          '     File "<stdin>", line 1, in <module>\n'
           "   TypeError: f() got multiple values for keyword argument 'a'\n"
           '   >>> f(1, *(2,))\n'
           '   1 2\n'
@@ -1669,7 +1669,7 @@ topics = {'assert': 'The "assert" statement\n'
                 'they\n'
                 '  have equal *(key, value)* pairs. Equality comparison of the '
                 'keys and\n'
-                '  elements enforces reflexivity.\n'
+                '  values enforces reflexivity.\n'
                 '\n'
                 '  Order comparisons ("<", ">", "<=", and ">=") raise '
                 '"TypeError".\n'
@@ -1761,9 +1761,9 @@ topics = {'assert': 'The "assert" statement\n'
                 '\n'
                 'The operators "in" and "not in" test for membership.  "x in '
                 's"\n'
-                'evaluates to true if *x* is a member of *s*, and false '
-                'otherwise.  "x\n'
-                'not in s" returns the negation of "x in s".  All built-in '
+                'evaluates to "True" if *x* is a member of *s*, and "False" '
+                'otherwise.\n'
+                '"x not in s" returns the negation of "x in s".  All built-in '
                 'sequences\n'
                 'and set types support this as well as dictionary, for which '
                 '"in" tests\n'
@@ -1774,30 +1774,32 @@ topics = {'assert': 'The "assert" statement\n'
                 'for e in\n'
                 'y)".\n'
                 '\n'
-                'For the string and bytes types, "x in y" is true if and only '
-                'if *x* is\n'
-                'a substring of *y*.  An equivalent test is "y.find(x) != '
-                '-1".  Empty\n'
-                'strings are always considered to be a substring of any other '
-                'string,\n'
-                'so """ in "abc"" will return "True".\n'
+                'For the string and bytes types, "x in y" is "True" if and '
+                'only if *x*\n'
+                'is a substring of *y*.  An equivalent test is "y.find(x) != '
+                '-1".\n'
+                'Empty strings are always considered to be a substring of any '
+                'other\n'
+                'string, so """ in "abc"" will return "True".\n'
                 '\n'
                 'For user-defined classes which define the "__contains__()" '
                 'method, "x\n'
-                'in y" is true if and only if "y.__contains__(x)" is true.\n'
+                'in y" returns "True" if "y.__contains__(x)" returns a true '
+                'value, and\n'
+                '"False" otherwise.\n'
                 '\n'
                 'For user-defined classes which do not define "__contains__()" '
                 'but do\n'
-                'define "__iter__()", "x in y" is true if some value "z" with '
-                '"x == z"\n'
-                'is produced while iterating over "y".  If an exception is '
+                'define "__iter__()", "x in y" is "True" if some value "z" '
+                'with "x ==\n'
+                'z" is produced while iterating over "y".  If an exception is '
                 'raised\n'
                 'during the iteration, it is as if "in" raised that '
                 'exception.\n'
                 '\n'
                 'Lastly, the old-style iteration protocol is tried: if a class '
                 'defines\n'
-                '"__getitem__()", "x in y" is true if and only if there is a '
+                '"__getitem__()", "x in y" is "True" if and only if there is a '
                 'non-\n'
                 'negative integer index *i* such that "x == y[i]", and all '
                 'lower\n'
@@ -2839,11 +2841,11 @@ topics = {'assert': 'The "assert" statement\n'
                   '   Typical implementations create a new instance of the '
                   'class by\n'
                   '   invoking the superclass\'s "__new__()" method using\n'
-                  '   "super(currentclass, cls).__new__(cls[, ...])" with '
-                  'appropriate\n'
-                  '   arguments and then modifying the newly-created instance '
-                  'as\n'
-                  '   necessary before returning it.\n'
+                  '   "super().__new__(cls[, ...])" with appropriate arguments '
+                  'and then\n'
+                  '   modifying the newly-created instance as necessary before '
+                  'returning\n'
+                  '   it.\n'
                   '\n'
                   '   If "__new__()" returns an instance of *cls*, then the '
                   'new\n'
@@ -2878,7 +2880,7 @@ topics = {'assert': 'The "assert" statement\n'
                   '   any, must explicitly call it to ensure proper '
                   'initialization of the\n'
                   '   base class part of the instance; for example:\n'
-                  '   "BaseClass.__init__(self, [args...])".\n'
+                  '   "super().__init__([args...])".\n'
                   '\n'
                   '   Because "__new__()" and "__init__()" work together in '
                   'constructing\n'
@@ -3027,8 +3029,8 @@ topics = {'assert': 'The "assert" statement\n'
                   '\n'
                   'object.__bytes__(self)\n'
                   '\n'
-                  '   Called by "bytes()" to compute a byte-string '
-                  'representation of an\n'
+                  '   Called by bytes to compute a byte-string representation '
+                  'of an\n'
                   '   object. This should return a "bytes" object.\n'
                   '\n'
                   'object.__format__(self, format_spec)\n'
@@ -3346,7 +3348,7 @@ topics = {'assert': 'The "assert" statement\n'
              '   >>> import mymodule\n'
              '   >>> mymodule.test()\n'
              '   Traceback (most recent call last):\n'
-             '     File "<stdin>", line 1, in ?\n'
+             '     File "<stdin>", line 1, in <module>\n'
              '     File "./mymodule.py", line 4, in test\n'
              '       test2()\n'
              '     File "./mymodule.py", line 3, in test2\n'
@@ -4010,16 +4012,6 @@ topics = {'assert': 'The "assert" statement\n'
                      '   i = 42\n'
                      '   f()\n'
                      '\n'
-                     'There are several cases where Python statements are '
-                     'illegal when used\n'
-                     'in conjunction with nested scopes that contain free '
-                     'variables.\n'
-                     '\n'
-                     'If a variable is referenced in an enclosing scope, it is '
-                     'illegal to\n'
-                     'delete the name.  An error will be reported at compile '
-                     'time.\n'
-                     '\n'
                      'The "eval()" and "exec()" functions do not have access '
                      'to the full\n'
                      'environment for resolving names.  Names may be resolved '
@@ -4323,6 +4315,13 @@ topics = {'assert': 'The "assert" statement\n'
               'Builtins and restricted execution\n'
               '---------------------------------\n'
               '\n'
+              '**CPython implementation detail:** Users should not touch\n'
+              '"__builtins__"; it is strictly an implementation detail.  '
+              'Users\n'
+              'wanting to override values in the builtins namespace should '
+              '"import"\n'
+              'the "builtins" module and modify its attributes appropriately.\n'
+              '\n'
               'The builtins namespace associated with the execution of a code '
               'block\n'
               'is actually found by looking up the name "__builtins__" in its '
@@ -4335,16 +4334,7 @@ topics = {'assert': 'The "assert" statement\n'
               'in any\n'
               'other module, "__builtins__" is an alias for the dictionary of '
               'the\n'
-              '"builtins" module itself.  "__builtins__" can be set to a '
-              'user-created\n'
-              'dictionary to create a weak form of restricted execution.\n'
-              '\n'
-              '**CPython implementation detail:** Users should not touch\n'
-              '"__builtins__"; it is strictly an implementation detail.  '
-              'Users\n'
-              'wanting to override values in the builtins namespace should '
-              '"import"\n'
-              'the "builtins" module and modify its attributes appropriately.\n'
+              '"builtins" module itself.\n'
               '\n'
               '\n'
               'Interaction with dynamic features\n'
@@ -4360,14 +4350,6 @@ topics = {'assert': 'The "assert" statement\n'
               '   i = 42\n'
               '   f()\n'
               '\n'
-              'There are several cases where Python statements are illegal '
-              'when used\n'
-              'in conjunction with nested scopes that contain free variables.\n'
-              '\n'
-              'If a variable is referenced in an enclosing scope, it is '
-              'illegal to\n'
-              'delete the name.  An error will be reported at compile time.\n'
-              '\n'
               'The "eval()" and "exec()" functions do not have access to the '
               'full\n'
               'environment for resolving names.  Names may be resolved in the '
@@ -5521,8 +5503,8 @@ topics = {'assert': 'The "assert" statement\n'
            'change\n'
            'the meaning of the program.\n'
            '\n'
-           '**Programmer\'s note:** the "global" is a directive to the '
-           'parser.  It\n'
+           '**Programmer\'s note:** "global" is a directive to the parser.  '
+           'It\n'
            'applies only to code parsed at the same time as the "global"\n'
            'statement. In particular, a "global" statement contained in a '
            'string\n'
@@ -6031,8 +6013,9 @@ topics = {'assert': 'The "assert" statement\n'
        '**************************\n'
        '\n'
        'The operators "in" and "not in" test for membership.  "x in s"\n'
-       'evaluates to true if *x* is a member of *s*, and false otherwise.  "x\n'
-       'not in s" returns the negation of "x in s".  All built-in sequences\n'
+       'evaluates to "True" if *x* is a member of *s*, and "False" otherwise.\n'
+       '"x not in s" returns the negation of "x in s".  All built-in '
+       'sequences\n'
        'and set types support this as well as dictionary, for which "in" '
        'tests\n'
        'whether the dictionary has a given key. For container types such as\n'
@@ -6040,22 +6023,22 @@ topics = {'assert': 'The "assert" statement\n'
        'expression "x in y" is equivalent to "any(x is e or x == e for e in\n'
        'y)".\n'
        '\n'
-       'For the string and bytes types, "x in y" is true if and only if *x* '
-       'is\n'
-       'a substring of *y*.  An equivalent test is "y.find(x) != -1".  Empty\n'
-       'strings are always considered to be a substring of any other string,\n'
-       'so """ in "abc"" will return "True".\n'
+       'For the string and bytes types, "x in y" is "True" if and only if *x*\n'
+       'is a substring of *y*.  An equivalent test is "y.find(x) != -1".\n'
+       'Empty strings are always considered to be a substring of any other\n'
+       'string, so """ in "abc"" will return "True".\n'
        '\n'
        'For user-defined classes which define the "__contains__()" method, "x\n'
-       'in y" is true if and only if "y.__contains__(x)" is true.\n'
+       'in y" returns "True" if "y.__contains__(x)" returns a true value, and\n'
+       '"False" otherwise.\n'
        '\n'
        'For user-defined classes which do not define "__contains__()" but do\n'
-       'define "__iter__()", "x in y" is true if some value "z" with "x == z"\n'
-       'is produced while iterating over "y".  If an exception is raised\n'
+       'define "__iter__()", "x in y" is "True" if some value "z" with "x ==\n'
+       'z" is produced while iterating over "y".  If an exception is raised\n'
        'during the iteration, it is as if "in" raised that exception.\n'
        '\n'
        'Lastly, the old-style iteration protocol is tried: if a class defines\n'
-       '"__getitem__()", "x in y" is true if and only if there is a non-\n'
+       '"__getitem__()", "x in y" is "True" if and only if there is a non-\n'
        'negative integer index *i* such that "x == y[i]", and all lower\n'
        'integer indices do not raise "IndexError" exception.  (If any other\n'
        'exception is raised, it is as if "in" raised that exception).\n'
@@ -6305,6 +6288,12 @@ topics = {'assert': 'The "assert" statement\n'
            'Builtins and restricted execution\n'
            '=================================\n'
            '\n'
+           '**CPython implementation detail:** Users should not touch\n'
+           '"__builtins__"; it is strictly an implementation detail.  Users\n'
+           'wanting to override values in the builtins namespace should '
+           '"import"\n'
+           'the "builtins" module and modify its attributes appropriately.\n'
+           '\n'
            'The builtins namespace associated with the execution of a code '
            'block\n'
            'is actually found by looking up the name "__builtins__" in its '
@@ -6317,15 +6306,7 @@ topics = {'assert': 'The "assert" statement\n'
            'any\n'
            'other module, "__builtins__" is an alias for the dictionary of '
            'the\n'
-           '"builtins" module itself.  "__builtins__" can be set to a '
-           'user-created\n'
-           'dictionary to create a weak form of restricted execution.\n'
-           '\n'
-           '**CPython implementation detail:** Users should not touch\n'
-           '"__builtins__"; it is strictly an implementation detail.  Users\n'
-           'wanting to override values in the builtins namespace should '
-           '"import"\n'
-           'the "builtins" module and modify its attributes appropriately.\n'
+           '"builtins" module itself.\n'
            '\n'
            '\n'
            'Interaction with dynamic features\n'
@@ -6341,14 +6322,6 @@ topics = {'assert': 'The "assert" statement\n'
            '   i = 42\n'
            '   f()\n'
            '\n'
-           'There are several cases where Python statements are illegal when '
-           'used\n'
-           'in conjunction with nested scopes that contain free variables.\n'
-           '\n'
-           'If a variable is referenced in an enclosing scope, it is illegal '
-           'to\n'
-           'delete the name.  An error will be reported at compile time.\n'
-           '\n'
            'The "eval()" and "exec()" functions do not have access to the '
            'full\n'
            'environment for resolving names.  Names may be resolved in the '
@@ -6980,7 +6953,7 @@ topics = {'assert': 'The "assert" statement\n'
           '   ...\n'
           '   Traceback (most recent call last):\n'
           '     File "<stdin>", line 2, in <module>\n'
-          '   ZeroDivisionError: int division or modulo by zero\n'
+          '   ZeroDivisionError: division by zero\n'
           '\n'
           '   The above exception was the direct cause of the following '
           'exception:\n'
@@ -7002,7 +6975,7 @@ topics = {'assert': 'The "assert" statement\n'
           '   ...\n'
           '   Traceback (most recent call last):\n'
           '     File "<stdin>", line 2, in <module>\n'
-          '   ZeroDivisionError: int division or modulo by zero\n'
+          '   ZeroDivisionError: division by zero\n'
           '\n'
           '   During handling of the above exception, another exception '
           'occurred:\n'
@@ -7011,10 +6984,30 @@ topics = {'assert': 'The "assert" statement\n'
           '     File "<stdin>", line 4, in <module>\n'
           '   RuntimeError: Something bad happened\n'
           '\n'
+          'Exception chaining can be explicitly suppressed by specifying '
+          '"None"\n'
+          'in the "from" clause:\n'
+          '\n'
+          '   >>> try:\n'
+          '   ...     print(1 / 0)\n'
+          '   ... except:\n'
+          '   ...     raise RuntimeError("Something bad happened") from None\n'
+          '   ...\n'
+          '   Traceback (most recent call last):\n'
+          '     File "<stdin>", line 4, in <module>\n'
+          '   RuntimeError: Something bad happened\n'
+          '\n'
           'Additional information on exceptions can be found in section\n'
           'Exceptions, and information about handling exceptions is in '
           'section\n'
-          'The try statement.\n',
+          'The try statement.\n'
+          '\n'
+          'Changed in version 3.3: "None" is now permitted as "Y" in "raise X\n'
+          'from Y".\n'
+          '\n'
+          'New in version 3.3: The "__suppress_context__" attribute to '
+          'suppress\n'
+          'automatic display of the exception context.\n',
  'return': 'The "return" statement\n'
            '**********************\n'
            '\n'
@@ -7122,6 +7115,16 @@ topics = {'assert': 'The "assert" statement\n'
                    '   returns zero is considered to be false in a Boolean '
                    'context.\n'
                    '\n'
+                   '   **CPython implementation detail:** In CPython, the '
+                   'length is\n'
+                   '   required to be at most "sys.maxsize". If the length is '
+                   'larger than\n'
+                   '   "sys.maxsize" some features (such as "len()") may '
+                   'raise\n'
+                   '   "OverflowError".  To prevent raising "OverflowError" by '
+                   'truth value\n'
+                   '   testing, an object must define a "__bool__()" method.\n'
+                   '\n'
                    'object.__length_hint__(self)\n'
                    '\n'
                    '   Called to implement "operator.length_hint()". Should '
@@ -7497,11 +7500,11 @@ topics = {'assert': 'The "assert" statement\n'
                  '   Typical implementations create a new instance of the '
                  'class by\n'
                  '   invoking the superclass\'s "__new__()" method using\n'
-                 '   "super(currentclass, cls).__new__(cls[, ...])" with '
-                 'appropriate\n'
-                 '   arguments and then modifying the newly-created instance '
-                 'as\n'
-                 '   necessary before returning it.\n'
+                 '   "super().__new__(cls[, ...])" with appropriate arguments '
+                 'and then\n'
+                 '   modifying the newly-created instance as necessary before '
+                 'returning\n'
+                 '   it.\n'
                  '\n'
                  '   If "__new__()" returns an instance of *cls*, then the '
                  'new\n'
@@ -7536,7 +7539,7 @@ topics = {'assert': 'The "assert" statement\n'
                  '   any, must explicitly call it to ensure proper '
                  'initialization of the\n'
                  '   base class part of the instance; for example:\n'
-                 '   "BaseClass.__init__(self, [args...])".\n'
+                 '   "super().__init__([args...])".\n'
                  '\n'
                  '   Because "__new__()" and "__init__()" work together in '
                  'constructing\n'
@@ -7683,8 +7686,8 @@ topics = {'assert': 'The "assert" statement\n'
                  '\n'
                  'object.__bytes__(self)\n'
                  '\n'
-                 '   Called by "bytes()" to compute a byte-string '
-                 'representation of an\n'
+                 '   Called by bytes to compute a byte-string representation '
+                 'of an\n'
                  '   object. This should return a "bytes" object.\n'
                  '\n'
                  'object.__format__(self, format_spec)\n'
@@ -8740,6 +8743,15 @@ topics = {'assert': 'The "assert" statement\n'
                  '   returns zero is considered to be false in a Boolean '
                  'context.\n'
                  '\n'
+                 '   **CPython implementation detail:** In CPython, the length '
+                 'is\n'
+                 '   required to be at most "sys.maxsize". If the length is '
+                 'larger than\n'
+                 '   "sys.maxsize" some features (such as "len()") may raise\n'
+                 '   "OverflowError".  To prevent raising "OverflowError" by '
+                 'truth value\n'
+                 '   testing, an object must define a "__bool__()" method.\n'
+                 '\n'
                  'object.__length_hint__(self)\n'
                  '\n'
                  '   Called to implement "operator.length_hint()". Should '
@@ -9564,13 +9576,13 @@ topics = {'assert': 'The "assert" statement\n'
                    'str.join(iterable)\n'
                    '\n'
                    '   Return a string which is the concatenation of the '
-                   'strings in the\n'
-                   '   *iterable* *iterable*.  A "TypeError" will be raised if '
-                   'there are\n'
-                   '   any non-string values in *iterable*, including "bytes" '
-                   'objects.\n'
-                   '   The separator between elements is the string providing '
-                   'this method.\n'
+                   'strings in\n'
+                   '   *iterable*. A "TypeError" will be raised if there are '
+                   'any non-\n'
+                   '   string values in *iterable*, including "bytes" '
+                   'objects.  The\n'
+                   '   separator between elements is the string providing this '
+                   'method.\n'
                    '\n'
                    'str.ljust(width[, fillchar])\n'
                    '\n'
@@ -10695,11 +10707,11 @@ topics = {'assert': 'The "assert" statement\n'
           '8-bit\n'
           '         bytes, represented by integers in the range 0 <= x < 256.\n'
           '         Bytes literals (like "b\'abc\'") and the built-in '
-          'function\n'
-          '         "bytes()" can be used to construct bytes objects.  Also,\n'
-          '         bytes objects can be decoded to strings via the '
-          '"decode()"\n'
-          '         method.\n'
+          '"bytes()"\n'
+          '         constructor can be used to create bytes objects.  Also, '
+          'bytes\n'
+          '         objects can be decoded to strings via the "decode()" '
+          'method.\n'
           '\n'
           '   Mutable sequences\n'
           '      Mutable sequences can be changed after they are created.  '
@@ -10725,7 +10737,7 @@ topics = {'assert': 'The "assert" statement\n'
           '         the built-in "bytearray()" constructor.  Aside from being\n'
           '         mutable (and hence unhashable), byte arrays otherwise '
           'provide\n'
-          '         the same interface and functionality as immutable bytes\n'
+          '         the same interface and functionality as immutable "bytes"\n'
           '         objects.\n'
           '\n'
           '      The extension module "array" provides an additional example '
@@ -11998,7 +12010,7 @@ topics = {'assert': 'The "assert" statement\n'
              'comparison operations. The "+" (concatenation) and "*" '
              '(repetition)\n'
              'operations have the same priority as the corresponding numeric\n'
-             'operations.\n'
+             'operations. [3]\n'
              '\n'
              '+----------------------------+----------------------------------+------------+\n'
              '| Operation                  | Result                           '