diff options
Diffstat (limited to 'Lib/pydoc_data/topics.py')
-rw-r--r-- | Lib/pydoc_data/topics.py | 171 |
1 files changed, 119 insertions, 52 deletions
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py index 9d779d1..b9e7417 100644 --- a/Lib/pydoc_data/topics.py +++ b/Lib/pydoc_data/topics.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Autogenerated by Sphinx on Wed Dec 18 18:17:58 2019 +# Autogenerated by Sphinx on Mon Feb 10 19:25:27 2020 topics = {'assert': 'The "assert" statement\n' '**********************\n' '\n' @@ -470,24 +470,25 @@ topics = {'assert': 'The "assert" statement\n' 'The following code:\n' '\n' ' async for TARGET in ITER:\n' - ' BLOCK\n' + ' SUITE\n' ' else:\n' - ' BLOCK2\n' + ' SUITE2\n' '\n' 'Is semantically equivalent to:\n' '\n' ' iter = (ITER)\n' ' iter = type(iter).__aiter__(iter)\n' ' running = True\n' + '\n' ' while running:\n' ' try:\n' ' TARGET = await type(iter).__anext__(iter)\n' ' except StopAsyncIteration:\n' ' running = False\n' ' else:\n' - ' BLOCK\n' + ' SUITE\n' ' else:\n' - ' BLOCK2\n' + ' SUITE2\n' '\n' 'See also "__aiter__()" and "__anext__()" for details.\n' '\n' @@ -507,23 +508,27 @@ topics = {'assert': 'The "assert" statement\n' '\n' 'The following code:\n' '\n' - ' async with EXPR as VAR:\n' - ' BLOCK\n' + ' async with EXPRESSION as TARGET:\n' + ' SUITE\n' '\n' - 'Is semantically equivalent to:\n' + 'is semantically equivalent to:\n' '\n' - ' mgr = (EXPR)\n' - ' aexit = type(mgr).__aexit__\n' - ' aenter = type(mgr).__aenter__(mgr)\n' + ' manager = (EXPRESSION)\n' + ' aexit = type(manager).__aexit__\n' + ' aenter = type(manager).__aenter__\n' + ' value = await aenter(manager)\n' + ' hit_except = False\n' '\n' - ' VAR = await aenter\n' ' try:\n' - ' BLOCK\n' + ' TARGET = value\n' + ' SUITE\n' ' except:\n' - ' if not await aexit(mgr, *sys.exc_info()):\n' + ' hit_except = True\n' + ' if not await aexit(manager, *sys.exc_info()):\n' ' raise\n' - ' else:\n' - ' await aexit(mgr, None, None, None)\n' + ' finally:\n' + ' if not hit_except:\n' + ' await aexit(manager, None, None, None)\n' '\n' 'See also "__aenter__()" and "__aexit__()" for details.\n' '\n' @@ -2518,11 +2523,13 @@ topics = {'assert': 'The "assert" statement\n' '"with_item")\n' ' is evaluated to obtain a context manager.\n' '\n' - '2. The context manager’s "__exit__()" is loaded for later use.\n' + '2. The context manager’s "__enter__()" is loaded for later use.\n' + '\n' + '3. The context manager’s "__exit__()" is loaded for later use.\n' '\n' - '3. The context manager’s "__enter__()" method is invoked.\n' + '4. The context manager’s "__enter__()" method is invoked.\n' '\n' - '4. If a target was included in the "with" statement, the return\n' + '5. If a target was included in the "with" statement, the return\n' ' value from "__enter__()" is assigned to it.\n' '\n' ' Note: The "with" statement guarantees that if the ' @@ -2535,9 +2542,9 @@ topics = {'assert': 'The "assert" statement\n' 'occurring\n' ' within the suite would be. See step 6 below.\n' '\n' - '5. The suite is executed.\n' + '6. The suite is executed.\n' '\n' - '6. The context manager’s "__exit__()" method is invoked. If an\n' + '7. The context manager’s "__exit__()" method is invoked. If an\n' ' exception caused the suite to be exited, its type, value, ' 'and\n' ' traceback are passed as arguments to "__exit__()". Otherwise, ' @@ -2559,18 +2566,42 @@ topics = {'assert': 'The "assert" statement\n' 'proceeds\n' ' at the normal location for the kind of exit that was taken.\n' '\n' + 'The following code:\n' + '\n' + ' with EXPRESSION as TARGET:\n' + ' SUITE\n' + '\n' + 'is semantically equivalent to:\n' + '\n' + ' manager = (EXPRESSION)\n' + ' enter = type(manager).__enter__\n' + ' exit = type(manager).__exit__\n' + ' value = enter(manager)\n' + ' hit_except = False\n' + '\n' + ' try:\n' + ' TARGET = value\n' + ' SUITE\n' + ' except:\n' + ' hit_except = True\n' + ' if not exit(manager, *sys.exc_info()):\n' + ' raise\n' + ' finally:\n' + ' if not hit_except:\n' + ' exit(manager, None, None, None)\n' + '\n' 'With more than one item, the context managers are processed as ' 'if\n' 'multiple "with" statements were nested:\n' '\n' ' with A() as a, B() as b:\n' - ' suite\n' + ' SUITE\n' '\n' - 'is equivalent to\n' + 'is semantically equivalent to:\n' '\n' ' with A() as a:\n' ' with B() as b:\n' - ' suite\n' + ' SUITE\n' '\n' 'Changed in version 3.1: Support for multiple context ' 'expressions.\n' @@ -2934,24 +2965,25 @@ topics = {'assert': 'The "assert" statement\n' 'The following code:\n' '\n' ' async for TARGET in ITER:\n' - ' BLOCK\n' + ' SUITE\n' ' else:\n' - ' BLOCK2\n' + ' SUITE2\n' '\n' 'Is semantically equivalent to:\n' '\n' ' iter = (ITER)\n' ' iter = type(iter).__aiter__(iter)\n' ' running = True\n' + '\n' ' while running:\n' ' try:\n' ' TARGET = await type(iter).__anext__(iter)\n' ' except StopAsyncIteration:\n' ' running = False\n' ' else:\n' - ' BLOCK\n' + ' SUITE\n' ' else:\n' - ' BLOCK2\n' + ' SUITE2\n' '\n' 'See also "__aiter__()" and "__anext__()" for details.\n' '\n' @@ -2971,23 +3003,27 @@ topics = {'assert': 'The "assert" statement\n' '\n' 'The following code:\n' '\n' - ' async with EXPR as VAR:\n' - ' BLOCK\n' + ' async with EXPRESSION as TARGET:\n' + ' SUITE\n' '\n' - 'Is semantically equivalent to:\n' + 'is semantically equivalent to:\n' '\n' - ' mgr = (EXPR)\n' - ' aexit = type(mgr).__aexit__\n' - ' aenter = type(mgr).__aenter__(mgr)\n' + ' manager = (EXPRESSION)\n' + ' aexit = type(manager).__aexit__\n' + ' aenter = type(manager).__aenter__\n' + ' value = await aenter(manager)\n' + ' hit_except = False\n' '\n' - ' VAR = await aenter\n' ' try:\n' - ' BLOCK\n' + ' TARGET = value\n' + ' SUITE\n' ' except:\n' - ' if not await aexit(mgr, *sys.exc_info()):\n' + ' hit_except = True\n' + ' if not await aexit(manager, *sys.exc_info()):\n' ' raise\n' - ' else:\n' - ' await aexit(mgr, None, None, None)\n' + ' finally:\n' + ' if not hit_except:\n' + ' await aexit(manager, None, None, None)\n' '\n' 'See also "__aenter__()" and "__aexit__()" for details.\n' '\n' @@ -6803,7 +6839,7 @@ topics = {'assert': 'The "assert" statement\n' 'object.__rfloordiv__(self, other)\n' 'object.__rmod__(self, other)\n' 'object.__rdivmod__(self, other)\n' - 'object.__rpow__(self, other)\n' + 'object.__rpow__(self, other[, modulo])\n' 'object.__rlshift__(self, other)\n' 'object.__rrshift__(self, other)\n' 'object.__rand__(self, other)\n' @@ -8963,7 +8999,9 @@ topics = {'assert': 'The "assert" statement\n' 'bases,\n' '**kwds)" (where the additional keyword arguments, if any, ' 'come from\n' - 'the class definition).\n' + 'the class definition). The "__prepare__" method should be ' + 'implemented\n' + 'as a "classmethod()".\n' '\n' 'If the metaclass has no "__prepare__" attribute, then the ' 'class\n' @@ -9477,7 +9515,7 @@ topics = {'assert': 'The "assert" statement\n' 'object.__rfloordiv__(self, other)\n' 'object.__rmod__(self, other)\n' 'object.__rdivmod__(self, other)\n' - 'object.__rpow__(self, other)\n' + 'object.__rpow__(self, other[, modulo])\n' 'object.__rlshift__(self, other)\n' 'object.__rrshift__(self, other)\n' 'object.__rand__(self, other)\n' @@ -11918,8 +11956,9 @@ topics = {'assert': 'The "assert" statement\n' ' bytecode offsets to line numbers (for details see the source\n' ' code of the interpreter); "co_stacksize" is the required ' 'stack\n' - ' size (including local variables); "co_flags" is an integer\n' - ' encoding a number of flags for the interpreter.\n' + ' size; "co_flags" is an integer encoding a number of flags ' + 'for\n' + ' the interpreter.\n' '\n' ' The following flag bits are defined for "co_flags": bit ' '"0x04"\n' @@ -12372,6 +12411,8 @@ topics = {'assert': 'The "assert" statement\n' 'dictionary. This\n' ' is a shortcut for "reversed(d.keys())".\n' '\n' + ' New in version 3.8.\n' + '\n' ' setdefault(key[, default])\n' '\n' ' If *key* is in the dictionary, return its value. If ' @@ -13577,11 +13618,13 @@ topics = {'assert': 'The "assert" statement\n' '1. The context expression (the expression given in the "with_item")\n' ' is evaluated to obtain a context manager.\n' '\n' - '2. The context manager’s "__exit__()" is loaded for later use.\n' + '2. The context manager’s "__enter__()" is loaded for later use.\n' '\n' - '3. The context manager’s "__enter__()" method is invoked.\n' + '3. The context manager’s "__exit__()" is loaded for later use.\n' '\n' - '4. If a target was included in the "with" statement, the return\n' + '4. The context manager’s "__enter__()" method is invoked.\n' + '\n' + '5. If a target was included in the "with" statement, the return\n' ' value from "__enter__()" is assigned to it.\n' '\n' ' Note: The "with" statement guarantees that if the "__enter__()"\n' @@ -13591,9 +13634,9 @@ topics = {'assert': 'The "assert" statement\n' ' target list, it will be treated the same as an error occurring\n' ' within the suite would be. See step 6 below.\n' '\n' - '5. The suite is executed.\n' + '6. The suite is executed.\n' '\n' - '6. The context manager’s "__exit__()" method is invoked. If an\n' + '7. The context manager’s "__exit__()" method is invoked. If an\n' ' exception caused the suite to be exited, its type, value, and\n' ' traceback are passed as arguments to "__exit__()". Otherwise, ' 'three\n' @@ -13613,17 +13656,41 @@ topics = {'assert': 'The "assert" statement\n' 'proceeds\n' ' at the normal location for the kind of exit that was taken.\n' '\n' + 'The following code:\n' + '\n' + ' with EXPRESSION as TARGET:\n' + ' SUITE\n' + '\n' + 'is semantically equivalent to:\n' + '\n' + ' manager = (EXPRESSION)\n' + ' enter = type(manager).__enter__\n' + ' exit = type(manager).__exit__\n' + ' value = enter(manager)\n' + ' hit_except = False\n' + '\n' + ' try:\n' + ' TARGET = value\n' + ' SUITE\n' + ' except:\n' + ' hit_except = True\n' + ' if not exit(manager, *sys.exc_info()):\n' + ' raise\n' + ' finally:\n' + ' if not hit_except:\n' + ' exit(manager, None, None, None)\n' + '\n' 'With more than one item, the context managers are processed as if\n' 'multiple "with" statements were nested:\n' '\n' ' with A() as a, B() as b:\n' - ' suite\n' + ' SUITE\n' '\n' - 'is equivalent to\n' + 'is semantically equivalent to:\n' '\n' ' with A() as a:\n' ' with B() as b:\n' - ' suite\n' + ' SUITE\n' '\n' 'Changed in version 3.1: Support for multiple context expressions.\n' '\n' |