diff options
Diffstat (limited to 'Lib/pydoc_data/topics.py')
-rw-r--r-- | Lib/pydoc_data/topics.py | 196 |
1 files changed, 93 insertions, 103 deletions
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py index 9dc4a71620..2d34529e81 100644 --- a/Lib/pydoc_data/topics.py +++ b/Lib/pydoc_data/topics.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Autogenerated by Sphinx on Sat Oct 20 01:13:41 2018 +# Autogenerated by Sphinx on Tue Dec 11 16:32:37 2018 topics = {'assert': 'The "assert" statement\n' '**********************\n' '\n' @@ -26,7 +26,8 @@ topics = {'assert': 'The "assert" statement\n' 'implementation, the built-in variable "__debug__" is "True" under\n' 'normal circumstances, "False" when optimization is requested ' '(command\n' - 'line option -O). The current code generator emits no code for an\n' + 'line option "-O"). The current code generator emits no code for ' + 'an\n' 'assert statement when optimization is requested at compile time. ' 'Note\n' 'that it is unnecessary to include the source code for the ' @@ -87,23 +88,16 @@ topics = {'assert': 'The "assert" statement\n' 'parentheses or square brackets, is recursively defined as ' 'follows.\n' '\n' - '* If the target list is empty: The object must also be an ' - 'empty\n' - ' iterable.\n' - '\n' - '* If the target list is a single target in parentheses: The ' - 'object\n' - ' is assigned to that target.\n' + '* If the target list is a single target with no trailing ' + 'comma,\n' + ' optionally in parentheses, the object is assigned to that ' + 'target.\n' '\n' - '* If the target list is a comma-separated list of targets, or ' - 'a\n' - ' single target in square brackets: The object must be an ' - 'iterable\n' - ' with the same number of items as there are targets in the ' - 'target\n' - ' list, and the items are assigned, from left to right, to ' - 'the\n' - ' corresponding targets.\n' + '* Else: The object must be an iterable with the same number of ' + 'items\n' + ' as there are targets in the target list, and the items are ' + 'assigned,\n' + ' from left to right, to the corresponding targets.\n' '\n' ' * If the target list contains one target prefixed with an\n' ' asterisk, called a “starred” target: The object must be ' @@ -400,9 +394,21 @@ topics = {'assert': 'The "assert" statement\n' 'the last\n' '"__setitem__()" or "__setattr__()" call.\n' '\n' - 'See also: **PEP 526** - Variable and attribute annotation ' - 'syntax\n' - ' **PEP 484** - Type hints\n', + 'See also:\n' + '\n' + ' **PEP 526** - Syntax for Variable Annotations\n' + ' The proposal that added syntax for annotating the types ' + 'of\n' + ' variables (including class variables and instance ' + 'variables),\n' + ' instead of expressing them through comments.\n' + '\n' + ' **PEP 484** - Type hints\n' + ' The proposal that added the "typing" module to provide a ' + 'standard\n' + ' syntax for type annotations that can be used in static ' + 'analysis\n' + ' tools and IDEs.\n', 'atom-identifiers': 'Identifiers (Names)\n' '*******************\n' '\n' @@ -1176,7 +1182,7 @@ topics = {'assert': 'The "assert" statement\n' 'is\n' 'returned.\n' '\n' - '(Note that neither "and" nor "or" restrict the value and type ' + 'Note that neither "and" nor "or" restrict the value and type ' 'they\n' 'return to "False" and "True", but rather return the last ' 'evaluated\n' @@ -1442,7 +1448,7 @@ topics = {'assert': 'The "assert" statement\n' 'original global namespace. (Usually, the suite contains mostly\n' 'function definitions.) When the class’s suite finishes execution, ' 'its\n' - 'execution frame is discarded but its local namespace is saved. [4] ' + 'execution frame is discarded but its local namespace is saved. [3] ' 'A\n' 'class object is then created using the inheritance list for the ' 'base\n' @@ -1492,8 +1498,18 @@ topics = {'assert': 'The "assert" statement\n' 'unexpected results. Descriptors can be used to create instance\n' 'variables with different implementation details.\n' '\n' - 'See also: **PEP 3115** - Metaclasses in Python 3 **PEP 3129** -\n' - ' Class Decorators\n', + 'See also:\n' + '\n' + ' **PEP 3115** - Metaclasses in Python 3000\n' + ' The proposal that changed the declaration of metaclasses to ' + 'the\n' + ' current syntax, and the semantics for how classes with\n' + ' metaclasses are constructed.\n' + '\n' + ' **PEP 3129** - Class Decorators\n' + ' The proposal that added class decorators. Function and ' + 'method\n' + ' decorators were introduced in **PEP 318**.\n', 'comparisons': 'Comparisons\n' '***********\n' '\n' @@ -2198,9 +2214,11 @@ topics = {'assert': 'The "assert" statement\n' 'returning\n' 'from a function that handled an exception.\n' '\n' - 'The optional "else" clause is executed if and when control flows ' - 'off\n' - 'the end of the "try" clause. [2] Exceptions in the "else" clause ' + 'The optional "else" clause is executed if the control flow ' + 'leaves the\n' + '"try" suite, no exception was raised, and no "return", ' + '"continue", or\n' + '"break" statement was executed. Exceptions in the "else" clause ' 'are\n' 'not handled by the preceding "except" clauses.\n' '\n' @@ -2388,7 +2406,7 @@ topics = {'assert': 'The "assert" statement\n' '\n' 'The function definition does not execute the function body; this ' 'gets\n' - 'executed only when the function is called. [3]\n' + 'executed only when the function is called. [2]\n' '\n' 'A function definition may be wrapped by one or more *decorator*\n' 'expressions. Decorator expressions are evaluated when the ' @@ -2561,7 +2579,7 @@ topics = {'assert': 'The "assert" statement\n' 'function definitions.) When the class’s suite finishes ' 'execution, its\n' 'execution frame is discarded but its local namespace is saved. ' - '[4] A\n' + '[3] A\n' 'class object is then created using the inheritance list for the ' 'base\n' 'classes and the saved local namespace for the attribute ' @@ -2613,8 +2631,18 @@ topics = {'assert': 'The "assert" statement\n' 'unexpected results. Descriptors can be used to create instance\n' 'variables with different implementation details.\n' '\n' - 'See also: **PEP 3115** - Metaclasses in Python 3 **PEP 3129** -\n' - ' Class Decorators\n' + 'See also:\n' + '\n' + ' **PEP 3115** - Metaclasses in Python 3000\n' + ' The proposal that changed the declaration of metaclasses to ' + 'the\n' + ' current syntax, and the semantics for how classes with\n' + ' metaclasses are constructed.\n' + '\n' + ' **PEP 3129** - Class Decorators\n' + ' The proposal that added class decorators. Function and ' + 'method\n' + ' decorators were introduced in **PEP 318**.\n' '\n' '\n' 'Coroutines\n' @@ -2731,7 +2759,12 @@ topics = {'assert': 'The "assert" statement\n' 'an\n' '"async def" function.\n' '\n' - 'See also: **PEP 492** - Coroutines with async and await syntax\n' + 'See also:\n' + '\n' + ' **PEP 492** - Coroutines with async and await syntax\n' + ' The proposal that made coroutines a proper standalone ' + 'concept in\n' + ' Python, and added supporting syntax.\n' '\n' '-[ Footnotes ]-\n' '\n' @@ -2740,16 +2773,11 @@ topics = {'assert': 'The "assert" statement\n' ' exception. That new exception causes the old one to be ' 'lost.\n' '\n' - '[2] Currently, control “flows off the end” except in the case ' - 'of\n' - ' an exception or the execution of a "return", "continue", or\n' - ' "break" statement.\n' - '\n' - '[3] A string literal appearing as the first statement in the\n' + '[2] A string literal appearing as the first statement in the\n' ' function body is transformed into the function’s "__doc__"\n' ' attribute and therefore the function’s *docstring*.\n' '\n' - '[4] A string literal appearing as the first statement in the ' + '[3] A string literal appearing as the first statement in the ' 'class\n' ' body is transformed into the namespace’s "__doc__" item and\n' ' therefore the class’s *docstring*.\n', @@ -4172,7 +4200,7 @@ topics = {'assert': 'The "assert" statement\n' 'argument to the interpreter) is a code block. A script command ' '(a\n' 'command specified on the interpreter command line with the ' - '‘**-c**’\n' + '"-c"\n' 'option) is a code block. The string argument passed to the ' 'built-in\n' 'functions "eval()" and "exec()" is a code block.\n' @@ -5188,7 +5216,7 @@ topics = {'assert': 'The "assert" statement\n' '\n' 'The new format syntax also supports new and different ' 'options, shown\n' - 'in the follow examples.\n' + 'in the following examples.\n' '\n' 'Accessing arguments by position:\n' '\n' @@ -5368,7 +5396,7 @@ topics = {'assert': 'The "assert" statement\n' '\n' 'The function definition does not execute the function body; this ' 'gets\n' - 'executed only when the function is called. [3]\n' + 'executed only when the function is called. [2]\n' '\n' 'A function definition may be wrapped by one or more *decorator*\n' 'expressions. Decorator expressions are evaluated when the ' @@ -6119,8 +6147,9 @@ topics = {'assert': 'The "assert" statement\n' 'lambda': 'Lambdas\n' '*******\n' '\n' - ' lambda_expr ::= "lambda" [parameter_list]: expression\n' - ' lambda_expr_nocond ::= "lambda" [parameter_list]: ' + ' lambda_expr ::= "lambda" [parameter_list] ":" ' + 'expression\n' + ' lambda_expr_nocond ::= "lambda" [parameter_list] ":" ' 'expression_nocond\n' '\n' 'Lambda expressions (sometimes called lambda forms) are used to ' @@ -7222,12 +7251,6 @@ topics = {'assert': 'The "assert" statement\n' 'of the\n' ' sequence.\n' '\n' - 'object.__missing__(self, key)\n' - '\n' - ' Called by "dict"."__getitem__()" to implement ' - '"self[key]" for dict\n' - ' subclasses when key is not in the dictionary.\n' - '\n' 'object.__setitem__(self, key, value)\n' '\n' ' Called to implement assignment to "self[key]". Same ' @@ -7255,6 +7278,12 @@ topics = {'assert': 'The "assert" statement\n' ' raised for improper *key* values as for the ' '"__getitem__()" method.\n' '\n' + 'object.__missing__(self, key)\n' + '\n' + ' Called by "dict"."__getitem__()" to implement ' + '"self[key]" for dict\n' + ' subclasses when key is not in the dictionary.\n' + '\n' 'object.__iter__(self)\n' '\n' ' This method is called when an iterator is required for ' @@ -8632,8 +8661,8 @@ topics = {'assert': 'The "assert" statement\n' ' Describes the implicit "__class__" closure reference\n' '\n' '\n' - 'Metaclass example\n' - '-----------------\n' + 'Uses for metaclasses\n' + '--------------------\n' '\n' 'The potential uses for metaclasses are boundless. Some ideas ' 'that have\n' @@ -8643,48 +8672,6 @@ topics = {'assert': 'The "assert" statement\n' 'frameworks, and\n' 'automatic resource locking/synchronization.\n' '\n' - 'Here is an example of a metaclass that uses an\n' - '"collections.OrderedDict" to remember the order that class ' - 'variables\n' - 'are defined:\n' - '\n' - ' class OrderedClass(type):\n' - '\n' - ' @classmethod\n' - ' def __prepare__(metacls, name, bases, **kwds):\n' - ' return collections.OrderedDict()\n' - '\n' - ' def __new__(cls, name, bases, namespace, **kwds):\n' - ' result = type.__new__(cls, name, bases, ' - 'dict(namespace))\n' - ' result.members = tuple(namespace)\n' - ' return result\n' - '\n' - ' class A(metaclass=OrderedClass):\n' - ' def one(self): pass\n' - ' def two(self): pass\n' - ' def three(self): pass\n' - ' def four(self): pass\n' - '\n' - ' >>> A.members\n' - " ('__module__', 'one', 'two', 'three', 'four')\n" - '\n' - 'When the class definition for *A* gets executed, the process ' - 'begins\n' - 'with calling the metaclass’s "__prepare__()" method which ' - 'returns an\n' - 'empty "collections.OrderedDict". That mapping records the ' - 'methods and\n' - 'attributes of *A* as they are defined within the body of the ' - 'class\n' - 'statement. Once those definitions are executed, the ordered ' - 'dictionary\n' - 'is fully populated and the metaclass’s "__new__()" method ' - 'gets\n' - 'invoked. That method builds the new type and it saves the ' - 'ordered\n' - 'dictionary keys in an attribute called "members".\n' - '\n' '\n' 'Customizing instance and subclass checks\n' '========================================\n' @@ -8884,12 +8871,6 @@ topics = {'assert': 'The "assert" statement\n' 'the\n' ' sequence.\n' '\n' - 'object.__missing__(self, key)\n' - '\n' - ' Called by "dict"."__getitem__()" to implement "self[key]" ' - 'for dict\n' - ' subclasses when key is not in the dictionary.\n' - '\n' 'object.__setitem__(self, key, value)\n' '\n' ' Called to implement assignment to "self[key]". Same note ' @@ -8917,6 +8898,12 @@ topics = {'assert': 'The "assert" statement\n' ' raised for improper *key* values as for the ' '"__getitem__()" method.\n' '\n' + 'object.__missing__(self, key)\n' + '\n' + ' Called by "dict"."__getitem__()" to implement "self[key]" ' + 'for dict\n' + ' subclasses when key is not in the dictionary.\n' + '\n' 'object.__iter__(self)\n' '\n' ' This method is called when an iterator is required for a ' @@ -10556,8 +10543,11 @@ topics = {'assert': 'The "assert" statement\n' 'restored to their previous values (before the call) when returning\n' 'from a function that handled an exception.\n' '\n' - 'The optional "else" clause is executed if and when control flows off\n' - 'the end of the "try" clause. [2] Exceptions in the "else" clause are\n' + 'The optional "else" clause is executed if the control flow leaves ' + 'the\n' + '"try" suite, no exception was raised, and no "return", "continue", ' + 'or\n' + '"break" statement was executed. Exceptions in the "else" clause are\n' 'not handled by the preceding "except" clauses.\n' '\n' 'If "finally" is present, it specifies a ‘cleanup’ handler. The ' |