summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc_data/topics.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pydoc_data/topics.py')
-rw-r--r--Lib/pydoc_data/topics.py1258
1 files changed, 717 insertions, 541 deletions
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index d760056..93b54c8 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 Sep 23 14:35:51 2020
+# Autogenerated by Sphinx on Mon Dec 7 15:10:25 2020
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
@@ -99,27 +99,26 @@ topics = {'assert': 'The "assert" statement\n'
'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 '
- 'an\n'
- ' iterable with at least as many items as there are targets '
- 'in the\n'
- ' target list, minus one. The first items of the iterable '
- 'are\n'
- ' assigned, from left to right, to the targets before the '
+ ' * If the target list contains one target prefixed with an '
+ 'asterisk,\n'
+ ' called a “starred” target: The object must be an iterable '
+ 'with at\n'
+ ' least as many items as there are targets in the target '
+ 'list, minus\n'
+ ' one. The first items of the iterable are assigned, from '
+ 'left to\n'
+ ' right, to the targets before the starred target. The '
+ 'final items\n'
+ ' of the iterable are assigned to the targets after the '
'starred\n'
- ' target. The final items of the iterable are assigned to '
- 'the\n'
- ' targets after the starred target. A list of the remaining '
- 'items\n'
- ' in the iterable is then assigned to the starred target '
- '(the list\n'
- ' can be empty).\n'
+ ' target. A list of the remaining items in the iterable is '
+ 'then\n'
+ ' assigned to the starred target (the list can be empty).\n'
'\n'
' * Else: The object must be an iterable with the same number '
- 'of\n'
- ' items as there are targets in the target list, and the '
- 'items are\n'
+ 'of items\n'
+ ' as there are targets in the target list, and the items '
+ 'are\n'
' assigned, from left to right, to the corresponding '
'targets.\n'
'\n'
@@ -135,10 +134,10 @@ topics = {'assert': 'The "assert" statement\n'
'in the\n'
' current local namespace.\n'
'\n'
- ' * Otherwise: the name is bound to the object in the global\n'
- ' namespace or the outer namespace determined by '
- '"nonlocal",\n'
- ' respectively.\n'
+ ' * Otherwise: the name is bound to the object in the global '
+ 'namespace\n'
+ ' or the outer namespace determined by "nonlocal", '
+ 'respectively.\n'
'\n'
' The name is rebound if it was already bound. This may cause '
'the\n'
@@ -225,26 +224,27 @@ topics = {'assert': 'The "assert" statement\n'
'called with\n'
' appropriate arguments.\n'
'\n'
- '* If the target is a slicing: The primary expression in the\n'
- ' reference is evaluated. It should yield a mutable sequence '
- 'object\n'
- ' (such as a list). The assigned object should be a sequence '
- 'object\n'
- ' of the same type. Next, the lower and upper bound '
- 'expressions are\n'
- ' evaluated, insofar they are present; defaults are zero and '
- 'the\n'
- ' sequence’s length. The bounds should evaluate to integers. '
- 'If\n'
- ' either bound is negative, the sequence’s length is added to '
- 'it. The\n'
- ' resulting bounds are clipped to lie between zero and the '
+ '* If the target is a slicing: The primary expression in the '
+ 'reference\n'
+ ' is evaluated. It should yield a mutable sequence object '
+ '(such as a\n'
+ ' list). The assigned object should be a sequence object of '
+ 'the same\n'
+ ' type. Next, the lower and upper bound expressions are '
+ 'evaluated,\n'
+ ' insofar they are present; defaults are zero and the '
'sequence’s\n'
- ' length, inclusive. Finally, the sequence object is asked to '
- 'replace\n'
- ' the slice with the items of the assigned sequence. The '
- 'length of\n'
- ' the slice may be different from the length of the assigned '
+ ' length. The bounds should evaluate to integers. If either '
+ 'bound is\n'
+ ' negative, the sequence’s length is added to it. The '
+ 'resulting\n'
+ ' bounds are clipped to lie between zero and the sequence’s '
+ 'length,\n'
+ ' inclusive. Finally, the sequence object is asked to replace '
+ 'the\n'
+ ' slice with the items of the assigned sequence. The length '
+ 'of the\n'
+ ' slice may be different from the length of the assigned '
'sequence,\n'
' thus changing the length of the target sequence, if the '
'target\n'
@@ -544,13 +544,17 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'-[ Footnotes ]-\n'
'\n'
- '[1] The exception is propagated to the invocation stack unless\n'
- ' there is a "finally" clause which happens to raise another\n'
- ' exception. That new exception causes the old one to be lost.\n'
+ '[1] The exception is propagated to the invocation stack unless '
+ 'there\n'
+ ' is a "finally" clause which happens to raise another '
+ 'exception.\n'
+ ' That new exception causes the old one to be lost.\n'
'\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'
+ '[2] A string literal appearing as the first statement in the '
+ 'function\n'
+ ' body is transformed into the function’s "__doc__" attribute '
+ 'and\n'
+ ' therefore the function’s *docstring*.\n'
'\n'
'[3] A string literal appearing as the first statement in the class\n'
' body is transformed into the namespace’s "__doc__" item and\n'
@@ -688,11 +692,18 @@ topics = {'assert': 'The "assert" statement\n'
'needs, for\n'
' example, "object.__getattribute__(self, name)".\n'
'\n'
- ' Note: This method may still be bypassed when looking '
- 'up special\n'
- ' methods as the result of implicit invocation via '
- 'language syntax\n'
- ' or built-in functions. See Special method lookup.\n'
+ ' Note:\n'
+ '\n'
+ ' This method may still be bypassed when looking up '
+ 'special methods\n'
+ ' as the result of implicit invocation via language '
+ 'syntax or\n'
+ ' built-in functions. See Special method lookup.\n'
+ '\n'
+ ' For certain sensitive attribute accesses, raises an '
+ 'auditing event\n'
+ ' "object.__getattr__" with arguments "obj" and '
+ '"name".\n'
'\n'
'object.__setattr__(self, name, value)\n'
'\n'
@@ -710,6 +721,11 @@ topics = {'assert': 'The "assert" statement\n'
'for example,\n'
' "object.__setattr__(self, name, value)".\n'
'\n'
+ ' For certain sensitive attribute assignments, raises '
+ 'an auditing\n'
+ ' event "object.__setattr__" with arguments "obj", '
+ '"name", "value".\n'
+ '\n'
'object.__delattr__(self, name)\n'
'\n'
' Like "__setattr__()" but for attribute deletion '
@@ -718,6 +734,11 @@ topics = {'assert': 'The "assert" statement\n'
'obj.name" is\n'
' meaningful for the object.\n'
'\n'
+ ' For certain sensitive attribute deletions, raises an '
+ 'auditing event\n'
+ ' "object.__delattr__" with arguments "obj" and '
+ '"name".\n'
+ '\n'
'object.__dir__(self)\n'
'\n'
' Called when "dir()" is called on the object. A '
@@ -776,15 +797,16 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' sys.modules[__name__].__class__ = VerboseModule\n'
'\n'
- 'Note: Defining module "__getattr__" and setting module '
- '"__class__"\n'
- ' only affect lookups made using the attribute access '
- 'syntax –\n'
- ' directly accessing the module globals (whether by code '
- 'within the\n'
- ' module, or via a reference to the module’s globals '
- 'dictionary) is\n'
- ' unaffected.\n'
+ 'Note:\n'
+ '\n'
+ ' Defining module "__getattr__" and setting module '
+ '"__class__" only\n'
+ ' affect lookups made using the attribute access syntax '
+ '– directly\n'
+ ' accessing the module globals (whether by code within '
+ 'the module, or\n'
+ ' via a reference to the module’s globals dictionary) is '
+ 'unaffected.\n'
'\n'
'Changed in version 3.5: "__class__" module attribute is '
'now writable.\n'
@@ -867,12 +889,14 @@ topics = {'assert': 'The "assert" statement\n'
'created. The\n'
' descriptor has been assigned to *name*.\n'
'\n'
- ' Note: "__set_name__()" is only called implicitly as '
- 'part of the\n'
- ' "type" constructor, so it will need to be called '
- 'explicitly with\n'
- ' the appropriate parameters when a descriptor is '
- 'added to a class\n'
+ ' Note:\n'
+ '\n'
+ ' "__set_name__()" is only called implicitly as part '
+ 'of the "type"\n'
+ ' constructor, so it will need to be called '
+ 'explicitly with the\n'
+ ' appropriate parameters when a descriptor is added '
+ 'to a class\n'
' after initial creation:\n'
'\n'
' class A:\n'
@@ -1032,10 +1056,9 @@ topics = {'assert': 'The "assert" statement\n'
'--------------------------\n'
'\n'
'* When inheriting from a class without *__slots__*, the '
- '*__dict__*\n'
- ' and *__weakref__* attribute of the instances will '
- 'always be\n'
- ' accessible.\n'
+ '*__dict__* and\n'
+ ' *__weakref__* attribute of the instances will always '
+ 'be accessible.\n'
'\n'
'* Without a *__dict__* variable, instances cannot be '
'assigned new\n'
@@ -1050,14 +1073,12 @@ topics = {'assert': 'The "assert" statement\n'
' declaration.\n'
'\n'
'* Without a *__weakref__* variable for each instance, '
- 'classes\n'
- ' defining *__slots__* do not support weak references to '
- 'its\n'
- ' instances. If weak reference support is needed, then '
- 'add\n'
- ' "\'__weakref__\'" to the sequence of strings in the '
- '*__slots__*\n'
- ' declaration.\n'
+ 'classes defining\n'
+ ' *__slots__* do not support weak references to its '
+ 'instances. If weak\n'
+ ' reference support is needed, then add '
+ '"\'__weakref__\'" to the\n'
+ ' sequence of strings in the *__slots__* declaration.\n'
'\n'
'* *__slots__* are implemented at the class level by '
'creating\n'
@@ -1070,24 +1091,23 @@ topics = {'assert': 'The "assert" statement\n'
' attribute would overwrite the descriptor assignment.\n'
'\n'
'* The action of a *__slots__* declaration is not limited '
- 'to the\n'
- ' class where it is defined. *__slots__* declared in '
- 'parents are\n'
- ' available in child classes. However, child subclasses '
- 'will get a\n'
- ' *__dict__* and *__weakref__* unless they also define '
- '*__slots__*\n'
- ' (which should only contain names of any *additional* '
- 'slots).\n'
+ 'to the class\n'
+ ' where it is defined. *__slots__* declared in parents '
+ 'are available\n'
+ ' in child classes. However, child subclasses will get a '
+ '*__dict__*\n'
+ ' and *__weakref__* unless they also define *__slots__* '
+ '(which should\n'
+ ' only contain names of any *additional* slots).\n'
'\n'
'* If a class defines a slot also defined in a base '
- 'class, the\n'
- ' instance variable defined by the base class slot is '
- 'inaccessible\n'
- ' (except by retrieving its descriptor directly from the '
- 'base class).\n'
- ' This renders the meaning of the program undefined. In '
- 'the future, a\n'
+ 'class, the instance\n'
+ ' variable defined by the base class slot is '
+ 'inaccessible (except by\n'
+ ' retrieving its descriptor directly from the base '
+ 'class). This\n'
+ ' renders the meaning of the program undefined. In the '
+ 'future, a\n'
' check may be added to prevent this.\n'
'\n'
'* Nonempty *__slots__* does not work for classes derived '
@@ -1096,9 +1116,9 @@ topics = {'assert': 'The "assert" statement\n'
'"bytes" and "tuple".\n'
'\n'
'* Any non-string iterable may be assigned to '
- '*__slots__*. Mappings\n'
- ' may also be used; however, in the future, special '
- 'meaning may be\n'
+ '*__slots__*. Mappings may\n'
+ ' also be used; however, in the future, special meaning '
+ 'may be\n'
' assigned to the values corresponding to each key.\n'
'\n'
'* *__class__* assignment works only if both classes have '
@@ -1114,9 +1134,9 @@ topics = {'assert': 'The "assert" statement\n'
' raise "TypeError".\n'
'\n'
'* If an iterator is used for *__slots__* then a '
- 'descriptor is\n'
- ' created for each of the iterator’s values. However, '
- 'the *__slots__*\n'
+ 'descriptor is created\n'
+ ' for each of the iterator’s values. However, the '
+ '*__slots__*\n'
' attribute will be an empty iterator.\n',
'attribute-references': 'Attribute references\n'
'********************\n'
@@ -1458,8 +1478,8 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' Called when the instance is “called” as a function; if '
'this method\n'
- ' is defined, "x(arg1, arg2, ...)" is a shorthand for\n'
- ' "x.__call__(arg1, arg2, ...)".\n',
+ ' is defined, "x(arg1, arg2, ...)" roughly translates to\n'
+ ' "type(x).__call__(x, arg1, ...)".\n',
'calls': 'Calls\n'
'*****\n'
'\n'
@@ -1877,10 +1897,10 @@ topics = {'assert': 'The "assert" statement\n'
' != x" is true. This behavior is compliant with IEEE 754.\n'
'\n'
'* "None" and "NotImplemented" are singletons. **PEP 8** '
- 'advises\n'
- ' that comparisons for singletons should always be done with '
- '"is" or\n'
- ' "is not", never the equality operators.\n'
+ 'advises that\n'
+ ' comparisons for singletons should always be done with "is" '
+ 'or "is\n'
+ ' not", never the equality operators.\n'
'\n'
'* Binary sequences (instances of "bytes" or "bytearray") can '
'be\n'
@@ -1896,15 +1916,15 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' Strings and binary sequences cannot be directly compared.\n'
'\n'
- '* Sequences (instances of "tuple", "list", or "range") can '
- 'be\n'
- ' compared only within each of their types, with the '
- 'restriction that\n'
- ' ranges do not support order comparison. Equality '
- 'comparison across\n'
- ' these types results in inequality, and ordering comparison '
- 'across\n'
- ' these types raises "TypeError".\n'
+ '* Sequences (instances of "tuple", "list", or "range") can be '
+ 'compared\n'
+ ' only within each of their types, with the restriction that '
+ 'ranges do\n'
+ ' not support order comparison. Equality comparison across '
+ 'these\n'
+ ' types results in inequality, and ordering comparison across '
+ 'these\n'
+ ' types raises "TypeError".\n'
'\n'
' Sequences compare lexicographically using comparison of\n'
' corresponding elements. The built-in containers typically '
@@ -1928,8 +1948,8 @@ topics = {'assert': 'The "assert" statement\n'
' false because the type is not the same).\n'
'\n'
' * Collections that support order comparison are ordered the '
- 'same\n'
- ' as their first unequal elements (for example, "[1,2,x] <= '
+ 'same as\n'
+ ' their first unequal elements (for example, "[1,2,x] <= '
'[1,2,y]"\n'
' has the same value as "x <= y"). If a corresponding '
'element does\n'
@@ -1947,8 +1967,8 @@ topics = {'assert': 'The "assert" statement\n'
'"TypeError".\n'
'\n'
'* Sets (instances of "set" or "frozenset") can be compared '
- 'within\n'
- ' and across their types.\n'
+ 'within and\n'
+ ' across their types.\n'
'\n'
' They define order comparison operators to mean subset and '
'superset\n'
@@ -1967,8 +1987,8 @@ topics = {'assert': 'The "assert" statement\n'
' Comparison of sets enforces reflexivity of its elements.\n'
'\n'
'* Most other built-in types have no comparison methods '
- 'implemented,\n'
- ' so they inherit the default comparison behavior.\n'
+ 'implemented, so\n'
+ ' they inherit the default comparison behavior.\n'
'\n'
'User-defined classes that customize their comparison behavior '
'should\n'
@@ -2017,10 +2037,10 @@ topics = {'assert': 'The "assert" statement\n'
' "total_ordering()" decorator.\n'
'\n'
'* The "hash()" result should be consistent with equality. '
- 'Objects\n'
- ' that are equal should either have the same hash value, or '
- 'be marked\n'
- ' as unhashable.\n'
+ 'Objects that\n'
+ ' are equal should either have the same hash value, or be '
+ 'marked as\n'
+ ' unhashable.\n'
'\n'
'Python does not enforce these consistency rules. In fact, '
'the\n'
@@ -2294,10 +2314,11 @@ topics = {'assert': 'The "assert" statement\n'
':= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, '
'2]".\n'
'\n'
- 'Note: There is a subtlety when the sequence is being modified by '
- 'the\n'
- ' loop (this can only occur for mutable sequences, e.g. lists). '
- 'An\n'
+ 'Note:\n'
+ '\n'
+ ' There is a subtlety when the sequence is being modified by the '
+ 'loop\n'
+ ' (this can only occur for mutable sequences, e.g. lists). An\n'
' internal counter is used to keep track of which item is used '
'next,\n'
' and this is incremented on each iteration. When this counter '
@@ -2520,8 +2541,8 @@ topics = {'assert': 'The "assert" statement\n'
'follows:\n'
'\n'
'1. The context expression (the expression given in the '
- '"with_item")\n'
- ' is evaluated to obtain a context manager.\n'
+ '"with_item") is\n'
+ ' evaluated to obtain a context manager.\n'
'\n'
'2. The context manager’s "__enter__()" is loaded for later use.\n'
'\n'
@@ -2529,13 +2550,15 @@ topics = {'assert': 'The "assert" statement\n'
'\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'
+ '5. If a target was included in the "with" statement, the return '
+ 'value\n'
+ ' from "__enter__()" is assigned to it.\n'
+ '\n'
+ ' Note:\n'
'\n'
- ' Note: The "with" statement guarantees that if the '
- '"__enter__()"\n'
- ' method returns without an error, then "__exit__()" will '
- 'always be\n'
+ ' The "with" statement guarantees that if the "__enter__()" '
+ 'method\n'
+ ' returns without an error, then "__exit__()" will always be\n'
' called. Thus, if an error occurs during the assignment to '
'the\n'
' target list, it will be treated the same as an error '
@@ -3040,14 +3063,17 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'-[ Footnotes ]-\n'
'\n'
- '[1] The exception is propagated to the invocation stack unless\n'
- ' there is a "finally" clause which happens to raise another\n'
- ' exception. That new exception causes the old one to be '
- 'lost.\n'
+ '[1] The exception is propagated to the invocation stack unless '
+ 'there\n'
+ ' is a "finally" clause which happens to raise another '
+ 'exception.\n'
+ ' That new exception causes the old one to be lost.\n'
'\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'
+ '[2] A string literal appearing as the first statement in the '
+ 'function\n'
+ ' body is transformed into the function’s "__doc__" attribute '
+ 'and\n'
+ ' therefore the function’s *docstring*.\n'
'\n'
'[3] A string literal appearing as the first statement in the '
'class\n'
@@ -3146,8 +3172,8 @@ topics = {'assert': 'The "assert" statement\n'
' complex;\n'
'\n'
'* otherwise, if either argument is a floating point number, '
- 'the\n'
- ' other is converted to floating point;\n'
+ 'the other\n'
+ ' is converted to floating point;\n'
'\n'
'* otherwise, both must be integers and no conversion is '
'necessary.\n'
@@ -3257,7 +3283,9 @@ topics = {'assert': 'The "assert" statement\n'
'for\n'
' objects that still exist when the interpreter exits.\n'
'\n'
- ' Note: "del x" doesn’t directly call "x.__del__()" — the '
+ ' Note:\n'
+ '\n'
+ ' "del x" doesn’t directly call "x.__del__()" — the '
'former\n'
' decrements the reference count for "x" by one, and the '
'latter is\n'
@@ -3281,13 +3309,15 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' See also: Documentation for the "gc" module.\n'
'\n'
- ' Warning: Due to the precarious circumstances under '
- 'which\n'
- ' "__del__()" methods are invoked, exceptions that occur '
- 'during\n'
- ' their execution are ignored, and a warning is printed '
- 'to\n'
- ' "sys.stderr" instead. In particular:\n'
+ ' Warning:\n'
+ '\n'
+ ' Due to the precarious circumstances under which '
+ '"__del__()"\n'
+ ' methods are invoked, exceptions that occur during '
+ 'their execution\n'
+ ' are ignored, and a warning is printed to "sys.stderr" '
+ 'instead.\n'
+ ' In particular:\n'
'\n'
' * "__del__()" can be invoked when arbitrary code is '
'being\n'
@@ -3300,22 +3330,20 @@ topics = {'assert': 'The "assert" statement\n'
' that gets interrupted to execute "__del__()".\n'
'\n'
' * "__del__()" can be executed during interpreter '
- 'shutdown. As\n'
- ' a consequence, the global variables it needs to '
- 'access\n'
- ' (including other modules) may already have been '
- 'deleted or set\n'
- ' to "None". Python guarantees that globals whose name '
- 'begins\n'
- ' with a single underscore are deleted from their '
- 'module before\n'
- ' other globals are deleted; if no other references to '
- 'such\n'
- ' globals exist, this may help in assuring that '
- 'imported modules\n'
- ' are still available at the time when the "__del__()" '
- 'method is\n'
- ' called.\n'
+ 'shutdown. As a\n'
+ ' consequence, the global variables it needs to access '
+ '(including\n'
+ ' other modules) may already have been deleted or set '
+ 'to "None".\n'
+ ' Python guarantees that globals whose name begins '
+ 'with a single\n'
+ ' underscore are deleted from their module before '
+ 'other globals\n'
+ ' are deleted; if no other references to such globals '
+ 'exist, this\n'
+ ' may help in assuring that imported modules are still '
+ 'available\n'
+ ' at the time when the "__del__()" method is called.\n'
'\n'
'object.__repr__(self)\n'
'\n'
@@ -3434,16 +3462,21 @@ topics = {'assert': 'The "assert" statement\n'
' on the value to determine if the result is true or '
'false.\n'
'\n'
- ' By default, "__ne__()" delegates to "__eq__()" and '
- 'inverts the\n'
- ' result unless it is "NotImplemented". There are no '
- 'other implied\n'
- ' relationships among the comparison operators, for '
- 'example, the\n'
- ' truth of "(x<y or x==y)" does not imply "x<=y". To '
- 'automatically\n'
- ' generate ordering operations from a single root '
- 'operation, see\n'
+ ' By default, "object" implements "__eq__()" by using '
+ '"is", returning\n'
+ ' "NotImplemented" in the case of a false comparison: '
+ '"True if x is y\n'
+ ' else NotImplemented". For "__ne__()", by default it '
+ 'delegates to\n'
+ ' "__eq__()" and inverts the result unless it is '
+ '"NotImplemented".\n'
+ ' There are no other implied relationships among the '
+ 'comparison\n'
+ ' operators or default implementations; for example, the '
+ 'truth of\n'
+ ' "(x<y or x==y)" does not imply "x<=y". To automatically '
+ 'generate\n'
+ ' ordering operations from a single root operation, see\n'
' "functools.total_ordering()".\n'
'\n'
' See the paragraph on "__hash__()" for some important '
@@ -3491,19 +3524,21 @@ topics = {'assert': 'The "assert" statement\n'
' def __hash__(self):\n'
' return hash((self.name, self.nick, self.color))\n'
'\n'
- ' Note: "hash()" truncates the value returned from an '
- 'object’s\n'
- ' custom "__hash__()" method to the size of a '
- '"Py_ssize_t". This\n'
- ' is typically 8 bytes on 64-bit builds and 4 bytes on '
- '32-bit\n'
- ' builds. If an object’s "__hash__()" must '
- 'interoperate on builds\n'
- ' of different bit sizes, be sure to check the width on '
- 'all\n'
- ' supported builds. An easy way to do this is with '
- '"python -c\n'
- ' "import sys; print(sys.hash_info.width)"".\n'
+ ' Note:\n'
+ '\n'
+ ' "hash()" truncates the value returned from an object’s '
+ 'custom\n'
+ ' "__hash__()" method to the size of a "Py_ssize_t". '
+ 'This is\n'
+ ' typically 8 bytes on 64-bit builds and 4 bytes on '
+ '32-bit builds.\n'
+ ' If an object’s "__hash__()" must interoperate on '
+ 'builds of\n'
+ ' different bit sizes, be sure to check the width on all '
+ 'supported\n'
+ ' builds. An easy way to do this is with "python -c '
+ '"import sys;\n'
+ ' print(sys.hash_info.width)"".\n'
'\n'
' If a class does not define an "__eq__()" method it '
'should not\n'
@@ -3561,22 +3596,24 @@ topics = {'assert': 'The "assert" statement\n'
' hashable by an "isinstance(obj, '
'collections.abc.Hashable)" call.\n'
'\n'
- ' Note: By default, the "__hash__()" values of str and '
- 'bytes\n'
- ' objects are “salted” with an unpredictable random '
- 'value.\n'
- ' Although they remain constant within an individual '
- 'Python\n'
- ' process, they are not predictable between repeated '
- 'invocations of\n'
- ' Python.This is intended to provide protection against '
- 'a denial-\n'
- ' of-service caused by carefully-chosen inputs that '
- 'exploit the\n'
- ' worst case performance of a dict insertion, O(n^2) '
- 'complexity.\n'
- ' See '
- 'http://www.ocert.org/advisories/ocert-2011-003.html for\n'
+ ' Note:\n'
+ '\n'
+ ' By default, the "__hash__()" values of str and bytes '
+ 'objects are\n'
+ ' “salted” with an unpredictable random value. Although '
+ 'they\n'
+ ' remain constant within an individual Python process, '
+ 'they are not\n'
+ ' predictable between repeated invocations of '
+ 'Python.This is\n'
+ ' intended to provide protection against a '
+ 'denial-of-service caused\n'
+ ' by carefully-chosen inputs that exploit the worst '
+ 'case\n'
+ ' performance of a dict insertion, O(n^2) complexity. '
+ 'See\n'
+ ' http://www.ocert.org/advisories/ocert-2011-003.html '
+ 'for\n'
' details.Changing hash values affects the iteration '
'order of sets.\n'
' Python has never made guarantees about this ordering '
@@ -4156,9 +4193,11 @@ topics = {'assert': 'The "assert" statement\n'
'its\n'
' value.\n'
'\n'
- ' Note: "print()" can also be used, but is not a debugger '
- 'command —\n'
- ' this executes the Python "print()" function.\n'
+ ' Note:\n'
+ '\n'
+ ' "print()" can also be used, but is not a debugger command — '
+ 'this\n'
+ ' executes the Python "print()" function.\n'
'\n'
'pp expression\n'
'\n'
@@ -4290,8 +4329,8 @@ topics = {'assert': 'The "assert" statement\n'
'-[ Footnotes ]-\n'
'\n'
'[1] Whether a frame is considered to originate in a certain '
- 'module\n'
- ' is determined by the "__name__" in the frame globals.\n',
+ 'module is\n'
+ ' determined by the "__name__" in the frame globals.\n',
'del': 'The "del" statement\n'
'*******************\n'
'\n'
@@ -4471,13 +4510,15 @@ topics = {'assert': 'The "assert" statement\n'
'about the\n'
'exceptional condition.\n'
'\n'
- 'Note: Exception messages are not part of the Python API. '
- 'Their\n'
- ' contents may change from one version of Python to the next '
- 'without\n'
- ' warning and should not be relied on by code which will run '
- 'under\n'
- ' multiple versions of the interpreter.\n'
+ 'Note:\n'
+ '\n'
+ ' Exception messages are not part of the Python API. Their '
+ 'contents\n'
+ ' may change from one version of Python to the next without '
+ 'warning\n'
+ ' and should not be relied on by code which will run under '
+ 'multiple\n'
+ ' versions of the interpreter.\n'
'\n'
'See also the description of the "try" statement in section The '
'try\n'
@@ -4487,10 +4528,9 @@ topics = {'assert': 'The "assert" statement\n'
'-[ Footnotes ]-\n'
'\n'
'[1] This limitation occurs because the code that is executed '
- 'by\n'
- ' these operations is not available at the time the module '
- 'is\n'
- ' compiled.\n',
+ 'by these\n'
+ ' operations is not available at the time the module is '
+ 'compiled.\n',
'execmodel': 'Execution model\n'
'***************\n'
'\n'
@@ -4792,13 +4832,15 @@ topics = {'assert': 'The "assert" statement\n'
'about the\n'
'exceptional condition.\n'
'\n'
- 'Note: Exception messages are not part of the Python API. '
- 'Their\n'
- ' contents may change from one version of Python to the next '
- 'without\n'
- ' warning and should not be relied on by code which will run '
- 'under\n'
- ' multiple versions of the interpreter.\n'
+ 'Note:\n'
+ '\n'
+ ' Exception messages are not part of the Python API. Their '
+ 'contents\n'
+ ' may change from one version of Python to the next without '
+ 'warning\n'
+ ' and should not be relied on by code which will run under '
+ 'multiple\n'
+ ' versions of the interpreter.\n'
'\n'
'See also the description of the "try" statement in section The '
'try\n'
@@ -4807,11 +4849,10 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'-[ Footnotes ]-\n'
'\n'
- '[1] This limitation occurs because the code that is executed '
- 'by\n'
- ' these operations is not available at the time the module '
- 'is\n'
- ' compiled.\n',
+ '[1] This limitation occurs because the code that is executed by '
+ 'these\n'
+ ' operations is not available at the time the module is '
+ 'compiled.\n',
'exprlists': 'Expression lists\n'
'****************\n'
'\n'
@@ -4930,8 +4971,11 @@ topics = {'assert': 'The "assert" statement\n'
'i\n'
':= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, 2]".\n'
'\n'
- 'Note: There is a subtlety when the sequence is being modified by the\n'
- ' loop (this can only occur for mutable sequences, e.g. lists). An\n'
+ 'Note:\n'
+ '\n'
+ ' There is a subtlety when the sequence is being modified by the '
+ 'loop\n'
+ ' (this can only occur for mutable sequences, e.g. lists). An\n'
' internal counter is used to keep track of which item is used next,\n'
' and this is incremented on each iteration. When this counter has\n'
' reached the length of the sequence the loop terminates. This '
@@ -5245,24 +5289,23 @@ topics = {'assert': 'The "assert" statement\n'
'for the\n'
'conversion. The alternate form is defined differently for '
'different\n'
- 'types. This option is only valid for integer, float, '
- 'complex and\n'
- 'Decimal types. For integers, when binary, octal, or '
- 'hexadecimal output\n'
- 'is used, this option adds the prefix respective "\'0b\'", '
- '"\'0o\'", or\n'
- '"\'0x\'" to the output value. For floats, complex and '
- 'Decimal the\n'
- 'alternate form causes the result of the conversion to '
- 'always contain a\n'
- 'decimal-point character, even if no digits follow it. '
- 'Normally, a\n'
- 'decimal-point character appears in the result of these '
- 'conversions\n'
- 'only if a digit follows it. In addition, for "\'g\'" and '
- '"\'G\'"\n'
- 'conversions, trailing zeros are not removed from the '
- 'result.\n'
+ 'types. This option is only valid for integer, float and '
+ 'complex\n'
+ 'types. For integers, when binary, octal, or hexadecimal '
+ 'output is\n'
+ 'used, this option adds the prefix respective "\'0b\'", '
+ '"\'0o\'", or "\'0x\'"\n'
+ 'to the output value. For float and complex the alternate '
+ 'form causes\n'
+ 'the result of the conversion to always contain a '
+ 'decimal-point\n'
+ 'character, even if no digits follow it. Normally, a '
+ 'decimal-point\n'
+ 'character appears in the result of these conversions only '
+ 'if a digit\n'
+ 'follows it. In addition, for "\'g\'" and "\'G\'" '
+ 'conversions, trailing\n'
+ 'zeros are not removed from the result.\n'
'\n'
'The "\',\'" option signals the use of a comma for a '
'thousands separator.\n'
@@ -5400,9 +5443,8 @@ topics = {'assert': 'The "assert" statement\n'
'the integer\n'
'to a floating point number before formatting.\n'
'\n'
- 'The available presentation types for floating point and '
- 'decimal values\n'
- 'are:\n'
+ 'The available presentation types for "float" and "Decimal" '
+ 'values are:\n'
'\n'
' '
'+-----------+------------------------------------------------------------+\n'
@@ -5411,24 +5453,50 @@ topics = {'assert': 'The "assert" statement\n'
'|\n'
' '
'|===========|============================================================|\n'
- ' | "\'e\'" | Exponent notation. Prints the number in '
- 'scientific |\n'
- ' | | notation using the letter ‘e’ to indicate '
- 'the exponent. |\n'
- ' | | The default precision is '
- '"6". |\n'
+ ' | "\'e\'" | Scientific notation. For a given '
+ 'precision "p", formats |\n'
+ ' | | the number in scientific notation with the '
+ 'letter ‘e’ |\n'
+ ' | | separating the coefficient from the '
+ 'exponent. The |\n'
+ ' | | coefficient has one digit before and "p" '
+ 'digits after the |\n'
+ ' | | decimal point, for a total of "p + 1" '
+ 'significant digits. |\n'
+ ' | | With no precision given, uses a precision '
+ 'of "6" digits |\n'
+ ' | | after the decimal point for "float", and '
+ 'shows all |\n'
+ ' | | coefficient digits for "Decimal". If no '
+ 'digits follow the |\n'
+ ' | | decimal point, the decimal point is also '
+ 'removed unless |\n'
+ ' | | the "#" option is '
+ 'used. |\n'
' '
'+-----------+------------------------------------------------------------+\n'
- ' | "\'E\'" | Exponent notation. Same as "\'e\'" '
- 'except it uses an upper |\n'
+ ' | "\'E\'" | Scientific notation. Same as "\'e\'" '
+ 'except it uses an upper |\n'
' | | case ‘E’ as the separator '
'character. |\n'
' '
'+-----------+------------------------------------------------------------+\n'
- ' | "\'f\'" | Fixed-point notation. Displays the '
- 'number as a fixed-point |\n'
- ' | | number. The default precision is '
- '"6". |\n'
+ ' | "\'f\'" | Fixed-point notation. For a given '
+ 'precision "p", formats |\n'
+ ' | | the number as a decimal number with '
+ 'exactly "p" digits |\n'
+ ' | | following the decimal point. With no '
+ 'precision given, uses |\n'
+ ' | | a precision of "6" digits after the '
+ 'decimal point for |\n'
+ ' | | "float", and uses a precision large enough '
+ 'to show all |\n'
+ ' | | coefficient digits for "Decimal". If no '
+ 'digits follow the |\n'
+ ' | | decimal point, the decimal point is also '
+ 'removed unless |\n'
+ ' | | the "#" option is '
+ 'used. |\n'
' '
'+-----------+------------------------------------------------------------+\n'
' | "\'F\'" | Fixed-point notation. Same as "\'f\'", '
@@ -5474,9 +5542,14 @@ topics = {'assert': 'The "assert" statement\n'
' | | regardless of the precision. A precision '
'of "0" is |\n'
' | | treated as equivalent to a precision of '
- '"1". The default |\n'
- ' | | precision is '
- '"6". |\n'
+ '"1". With no |\n'
+ ' | | precision given, uses a precision of "6" '
+ 'significant |\n'
+ ' | | digits for "float", and shows all '
+ 'coefficient digits for |\n'
+ ' | | '
+ '"Decimal". '
+ '|\n'
' '
'+-----------+------------------------------------------------------------+\n'
' | "\'G\'" | General format. Same as "\'g\'" except '
@@ -5934,7 +6007,9 @@ topics = {'assert': 'The "assert" statement\n'
'defined.\n'
' See section The import statement.\n'
'\n'
- ' Note: The name "_" is often used in conjunction with\n'
+ ' Note:\n'
+ '\n'
+ ' The name "_" is often used in conjunction with\n'
' internationalization; refer to the documentation for the\n'
' "gettext" module for more information on this '
'convention.\n'
@@ -6080,7 +6155,9 @@ topics = {'assert': 'The "assert" statement\n'
'defined.\n'
' See section The import statement.\n'
'\n'
- ' Note: The name "_" is often used in conjunction with\n'
+ ' Note:\n'
+ '\n'
+ ' The name "_" is often used in conjunction with\n'
' internationalization; refer to the documentation for '
'the\n'
' "gettext" module for more information on this '
@@ -6165,8 +6242,9 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'1. find a module, loading and initializing it if necessary\n'
'\n'
- '2. define a name or names in the local namespace for the scope\n'
- ' where the "import" statement occurs.\n'
+ '2. define a name or names in the local namespace for the scope '
+ 'where\n'
+ ' the "import" statement occurs.\n'
'\n'
'When the statement contains multiple clauses (separated by commas) '
'the\n'
@@ -6192,8 +6270,9 @@ topics = {'assert': 'The "assert" statement\n'
'made\n'
'available in the local namespace in one of three ways:\n'
'\n'
- '* If the module name is followed by "as", then the name following\n'
- ' "as" is bound directly to the imported module.\n'
+ '* If the module name is followed by "as", then the name following '
+ '"as"\n'
+ ' is bound directly to the imported module.\n'
'\n'
'* If no other name is specified, and the module being imported is '
'a\n'
@@ -6342,8 +6421,8 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'* other future statements.\n'
'\n'
- 'The only feature in Python 3.7 that requires using the future\n'
- 'statement is "annotations".\n'
+ 'The only feature that requires using the future statement is\n'
+ '"annotations" (see **PEP 563**).\n'
'\n'
'All historical features enabled by the future statement are still\n'
'recognized by Python 3. The list includes "absolute_import",\n'
@@ -6871,15 +6950,18 @@ topics = {'assert': 'The "assert" statement\n'
'"__rpow__()" (the\n'
' coercion rules would become too complicated).\n'
'\n'
- ' Note: If the right operand’s type is a subclass of the '
- 'left\n'
- ' operand’s type and that subclass provides the '
- 'reflected method\n'
- ' for the operation, this method will be called before '
- 'the left\n'
- ' operand’s non-reflected method. This behavior allows '
- 'subclasses\n'
- ' to override their ancestors’ operations.\n'
+ ' Note:\n'
+ '\n'
+ ' If the right operand’s type is a subclass of the left '
+ 'operand’s\n'
+ ' type and that subclass provides a different '
+ 'implementation of the\n'
+ ' reflected method for the operation, this method will '
+ 'be called\n'
+ ' before the left operand’s non-reflected method. This '
+ 'behavior\n'
+ ' allows subclasses to override their ancestors’ '
+ 'operations.\n'
'\n'
'object.__iadd__(self, other)\n'
'object.__isub__(self, other)\n'
@@ -6923,13 +7005,15 @@ topics = {'assert': 'The "assert" statement\n'
'the data\n'
' model.\n'
'\n'
- ' Note: Due to a bug in the dispatching mechanism for '
- '"**=", a\n'
- ' class that defines "__ipow__()" but returns '
- '"NotImplemented"\n'
- ' would fail to fall back to "x.__pow__(y)" and '
- '"y.__rpow__(x)".\n'
- ' This bug is fixed in Python 3.10.\n'
+ ' Note:\n'
+ '\n'
+ ' Due to a bug in the dispatching mechanism for "**=", a '
+ 'class that\n'
+ ' defines "__ipow__()" but returns "NotImplemented" '
+ 'would fail to\n'
+ ' fall back to "x.__pow__(y)" and "y.__rpow__(x)". This '
+ 'bug is\n'
+ ' fixed in Python 3.10.\n'
'\n'
'object.__neg__(self)\n'
'object.__pos__(self)\n'
@@ -7207,8 +7291,8 @@ topics = {'assert': 'The "assert" statement\n'
'-[ Footnotes ]-\n'
'\n'
'[1] While "abs(x%y) < abs(y)" is true mathematically, '
- 'for floats\n'
- ' it may not be true numerically due to roundoff. For '
+ 'for floats it\n'
+ ' may not be true numerically due to roundoff. For '
'example, and\n'
' assuming a platform on which a Python float is an '
'IEEE 754 double-\n'
@@ -7273,22 +7357,22 @@ topics = {'assert': 'The "assert" statement\n'
'"unicodedata.normalize()".\n'
'\n'
'[4] Due to automatic garbage-collection, free lists, and '
- 'the\n'
- ' dynamic nature of descriptors, you may notice '
- 'seemingly unusual\n'
- ' behaviour in certain uses of the "is" operator, like '
- 'those\n'
- ' involving comparisons between instance methods, or '
- 'constants.\n'
- ' Check their documentation for more info.\n'
+ 'the dynamic\n'
+ ' nature of descriptors, you may notice seemingly '
+ 'unusual behaviour\n'
+ ' in certain uses of the "is" operator, like those '
+ 'involving\n'
+ ' comparisons between instance methods, or constants. '
+ 'Check their\n'
+ ' documentation for more info.\n'
'\n'
'[5] The "%" operator is also used for string formatting; '
'the same\n'
' precedence applies.\n'
'\n'
'[6] The power operator "**" binds less tightly than an '
- 'arithmetic\n'
- ' or bitwise unary operator on its right, that is, '
+ 'arithmetic or\n'
+ ' bitwise unary operator on its right, that is, '
'"2**-1" is "0.5".\n',
'pass': 'The "pass" statement\n'
'********************\n'
@@ -7578,9 +7662,11 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' New in version 3.4.\n'
'\n'
- 'Note: Slicing is done exclusively with the following three '
- 'methods.\n'
- ' A call like\n'
+ 'Note:\n'
+ '\n'
+ ' Slicing is done exclusively with the following three '
+ 'methods. A\n'
+ ' call like\n'
'\n'
' a[1:2] = b\n'
'\n'
@@ -7611,7 +7697,9 @@ topics = {'assert': 'The "assert" statement\n'
'the\n'
' container), "KeyError" should be raised.\n'
'\n'
- ' Note: "for" loops expect that an "IndexError" will be '
+ ' Note:\n'
+ '\n'
+ ' "for" loops expect that an "IndexError" will be '
'raised for\n'
' illegal indexes to allow proper detection of the end '
'of the\n'
@@ -7847,26 +7935,26 @@ topics = {'assert': 'The "assert" statement\n'
'-[ Footnotes ]-\n'
'\n'
'[1] Additional information on these special methods may be '
- 'found\n'
- ' in the Python Reference Manual (Basic customization).\n'
+ 'found in\n'
+ ' the Python Reference Manual (Basic customization).\n'
'\n'
'[2] As a consequence, the list "[1, 2]" is considered equal '
- 'to\n'
- ' "[1.0, 2.0]", and similarly for tuples.\n'
+ 'to "[1.0,\n'
+ ' 2.0]", and similarly for tuples.\n'
'\n'
'[3] They must have since the parser can’t tell the type of '
'the\n'
' operands.\n'
'\n'
'[4] Cased characters are those with general category '
- 'property\n'
- ' being one of “Lu” (Letter, uppercase), “Ll” (Letter, '
- 'lowercase),\n'
- ' or “Lt” (Letter, titlecase).\n'
- '\n'
- '[5] To format only a tuple you should therefore provide a\n'
- ' singleton tuple whose only element is the tuple to be '
- 'formatted.\n',
+ 'property being\n'
+ ' one of “Lu” (Letter, uppercase), “Ll” (Letter, '
+ 'lowercase), or “Lt”\n'
+ ' (Letter, titlecase).\n'
+ '\n'
+ '[5] To format only a tuple you should therefore provide a '
+ 'singleton\n'
+ ' tuple whose only element is the tuple to be formatted.\n',
'specialnames': 'Special method names\n'
'********************\n'
'\n'
@@ -8011,7 +8099,9 @@ topics = {'assert': 'The "assert" statement\n'
'for\n'
' objects that still exist when the interpreter exits.\n'
'\n'
- ' Note: "del x" doesn’t directly call "x.__del__()" — the '
+ ' Note:\n'
+ '\n'
+ ' "del x" doesn’t directly call "x.__del__()" — the '
'former\n'
' decrements the reference count for "x" by one, and the '
'latter is\n'
@@ -8035,12 +8125,15 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' See also: Documentation for the "gc" module.\n'
'\n'
- ' Warning: Due to the precarious circumstances under which\n'
- ' "__del__()" methods are invoked, exceptions that occur '
- 'during\n'
- ' their execution are ignored, and a warning is printed '
- 'to\n'
- ' "sys.stderr" instead. In particular:\n'
+ ' Warning:\n'
+ '\n'
+ ' Due to the precarious circumstances under which '
+ '"__del__()"\n'
+ ' methods are invoked, exceptions that occur during their '
+ 'execution\n'
+ ' are ignored, and a warning is printed to "sys.stderr" '
+ 'instead.\n'
+ ' In particular:\n'
'\n'
' * "__del__()" can be invoked when arbitrary code is '
'being\n'
@@ -8053,22 +8146,20 @@ topics = {'assert': 'The "assert" statement\n'
' that gets interrupted to execute "__del__()".\n'
'\n'
' * "__del__()" can be executed during interpreter '
- 'shutdown. As\n'
- ' a consequence, the global variables it needs to '
- 'access\n'
- ' (including other modules) may already have been '
- 'deleted or set\n'
- ' to "None". Python guarantees that globals whose name '
- 'begins\n'
- ' with a single underscore are deleted from their '
- 'module before\n'
- ' other globals are deleted; if no other references to '
- 'such\n'
- ' globals exist, this may help in assuring that '
- 'imported modules\n'
- ' are still available at the time when the "__del__()" '
- 'method is\n'
- ' called.\n'
+ 'shutdown. As a\n'
+ ' consequence, the global variables it needs to access '
+ '(including\n'
+ ' other modules) may already have been deleted or set '
+ 'to "None".\n'
+ ' Python guarantees that globals whose name begins with '
+ 'a single\n'
+ ' underscore are deleted from their module before other '
+ 'globals\n'
+ ' are deleted; if no other references to such globals '
+ 'exist, this\n'
+ ' may help in assuring that imported modules are still '
+ 'available\n'
+ ' at the time when the "__del__()" method is called.\n'
'\n'
'object.__repr__(self)\n'
'\n'
@@ -8187,16 +8278,21 @@ topics = {'assert': 'The "assert" statement\n'
' on the value to determine if the result is true or '
'false.\n'
'\n'
- ' By default, "__ne__()" delegates to "__eq__()" and '
- 'inverts the\n'
- ' result unless it is "NotImplemented". There are no other '
- 'implied\n'
- ' relationships among the comparison operators, for '
- 'example, the\n'
- ' truth of "(x<y or x==y)" does not imply "x<=y". To '
- 'automatically\n'
- ' generate ordering operations from a single root '
- 'operation, see\n'
+ ' By default, "object" implements "__eq__()" by using "is", '
+ 'returning\n'
+ ' "NotImplemented" in the case of a false comparison: "True '
+ 'if x is y\n'
+ ' else NotImplemented". For "__ne__()", by default it '
+ 'delegates to\n'
+ ' "__eq__()" and inverts the result unless it is '
+ '"NotImplemented".\n'
+ ' There are no other implied relationships among the '
+ 'comparison\n'
+ ' operators or default implementations; for example, the '
+ 'truth of\n'
+ ' "(x<y or x==y)" does not imply "x<=y". To automatically '
+ 'generate\n'
+ ' ordering operations from a single root operation, see\n'
' "functools.total_ordering()".\n'
'\n'
' See the paragraph on "__hash__()" for some important '
@@ -8244,19 +8340,21 @@ topics = {'assert': 'The "assert" statement\n'
' def __hash__(self):\n'
' return hash((self.name, self.nick, self.color))\n'
'\n'
- ' Note: "hash()" truncates the value returned from an '
- 'object’s\n'
- ' custom "__hash__()" method to the size of a '
- '"Py_ssize_t". This\n'
- ' is typically 8 bytes on 64-bit builds and 4 bytes on '
- '32-bit\n'
- ' builds. If an object’s "__hash__()" must interoperate '
- 'on builds\n'
- ' of different bit sizes, be sure to check the width on '
- 'all\n'
- ' supported builds. An easy way to do this is with '
- '"python -c\n'
- ' "import sys; print(sys.hash_info.width)"".\n'
+ ' Note:\n'
+ '\n'
+ ' "hash()" truncates the value returned from an object’s '
+ 'custom\n'
+ ' "__hash__()" method to the size of a "Py_ssize_t". '
+ 'This is\n'
+ ' typically 8 bytes on 64-bit builds and 4 bytes on '
+ '32-bit builds.\n'
+ ' If an object’s "__hash__()" must interoperate on '
+ 'builds of\n'
+ ' different bit sizes, be sure to check the width on all '
+ 'supported\n'
+ ' builds. An easy way to do this is with "python -c '
+ '"import sys;\n'
+ ' print(sys.hash_info.width)"".\n'
'\n'
' If a class does not define an "__eq__()" method it should '
'not\n'
@@ -8312,21 +8410,22 @@ topics = {'assert': 'The "assert" statement\n'
' hashable by an "isinstance(obj, '
'collections.abc.Hashable)" call.\n'
'\n'
- ' Note: By default, the "__hash__()" values of str and '
- 'bytes\n'
- ' objects are “salted” with an unpredictable random '
- 'value.\n'
- ' Although they remain constant within an individual '
- 'Python\n'
- ' process, they are not predictable between repeated '
- 'invocations of\n'
- ' Python.This is intended to provide protection against a '
- 'denial-\n'
- ' of-service caused by carefully-chosen inputs that '
- 'exploit the\n'
- ' worst case performance of a dict insertion, O(n^2) '
- 'complexity.\n'
- ' See http://www.ocert.org/advisories/ocert-2011-003.html '
+ ' Note:\n'
+ '\n'
+ ' By default, the "__hash__()" values of str and bytes '
+ 'objects are\n'
+ ' “salted” with an unpredictable random value. Although '
+ 'they\n'
+ ' remain constant within an individual Python process, '
+ 'they are not\n'
+ ' predictable between repeated invocations of Python.This '
+ 'is\n'
+ ' intended to provide protection against a '
+ 'denial-of-service caused\n'
+ ' by carefully-chosen inputs that exploit the worst case\n'
+ ' performance of a dict insertion, O(n^2) complexity. '
+ 'See\n'
+ ' http://www.ocert.org/advisories/ocert-2011-003.html '
'for\n'
' details.Changing hash values affects the iteration '
'order of sets.\n'
@@ -8415,11 +8514,17 @@ topics = {'assert': 'The "assert" statement\n'
'needs, for\n'
' example, "object.__getattribute__(self, name)".\n'
'\n'
- ' Note: This method may still be bypassed when looking up '
- 'special\n'
- ' methods as the result of implicit invocation via '
- 'language syntax\n'
- ' or built-in functions. See Special method lookup.\n'
+ ' Note:\n'
+ '\n'
+ ' This method may still be bypassed when looking up '
+ 'special methods\n'
+ ' as the result of implicit invocation via language '
+ 'syntax or\n'
+ ' built-in functions. See Special method lookup.\n'
+ '\n'
+ ' For certain sensitive attribute accesses, raises an '
+ 'auditing event\n'
+ ' "object.__getattr__" with arguments "obj" and "name".\n'
'\n'
'object.__setattr__(self, name, value)\n'
'\n'
@@ -8437,6 +8542,11 @@ topics = {'assert': 'The "assert" statement\n'
'example,\n'
' "object.__setattr__(self, name, value)".\n'
'\n'
+ ' For certain sensitive attribute assignments, raises an '
+ 'auditing\n'
+ ' event "object.__setattr__" with arguments "obj", "name", '
+ '"value".\n'
+ '\n'
'object.__delattr__(self, name)\n'
'\n'
' Like "__setattr__()" but for attribute deletion instead '
@@ -8445,6 +8555,10 @@ topics = {'assert': 'The "assert" statement\n'
'obj.name" is\n'
' meaningful for the object.\n'
'\n'
+ ' For certain sensitive attribute deletions, raises an '
+ 'auditing event\n'
+ ' "object.__delattr__" with arguments "obj" and "name".\n'
+ '\n'
'object.__dir__(self)\n'
'\n'
' Called when "dir()" is called on the object. A sequence '
@@ -8503,15 +8617,16 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' sys.modules[__name__].__class__ = VerboseModule\n'
'\n'
- 'Note: Defining module "__getattr__" and setting module '
- '"__class__"\n'
- ' only affect lookups made using the attribute access syntax '
- '–\n'
- ' directly accessing the module globals (whether by code '
- 'within the\n'
- ' module, or via a reference to the module’s globals '
- 'dictionary) is\n'
- ' unaffected.\n'
+ 'Note:\n'
+ '\n'
+ ' Defining module "__getattr__" and setting module '
+ '"__class__" only\n'
+ ' affect lookups made using the attribute access syntax – '
+ 'directly\n'
+ ' accessing the module globals (whether by code within the '
+ 'module, or\n'
+ ' via a reference to the module’s globals dictionary) is '
+ 'unaffected.\n'
'\n'
'Changed in version 3.5: "__class__" module attribute is now '
'writable.\n'
@@ -8594,12 +8709,14 @@ topics = {'assert': 'The "assert" statement\n'
'The\n'
' descriptor has been assigned to *name*.\n'
'\n'
- ' Note: "__set_name__()" is only called implicitly as part '
- 'of the\n'
- ' "type" constructor, so it will need to be called '
- 'explicitly with\n'
- ' the appropriate parameters when a descriptor is added '
- 'to a class\n'
+ ' Note:\n'
+ '\n'
+ ' "__set_name__()" is only called implicitly as part of '
+ 'the "type"\n'
+ ' constructor, so it will need to be called explicitly '
+ 'with the\n'
+ ' appropriate parameters when a descriptor is added to a '
+ 'class\n'
' after initial creation:\n'
'\n'
' class A:\n'
@@ -8757,10 +8874,9 @@ topics = {'assert': 'The "assert" statement\n'
'~~~~~~~~~~~~~~~~~~~~~~~~~~\n'
'\n'
'* When inheriting from a class without *__slots__*, the '
- '*__dict__*\n'
- ' and *__weakref__* attribute of the instances will always '
- 'be\n'
- ' accessible.\n'
+ '*__dict__* and\n'
+ ' *__weakref__* attribute of the instances will always be '
+ 'accessible.\n'
'\n'
'* Without a *__dict__* variable, instances cannot be '
'assigned new\n'
@@ -8774,13 +8890,12 @@ topics = {'assert': 'The "assert" statement\n'
' declaration.\n'
'\n'
'* Without a *__weakref__* variable for each instance, '
- 'classes\n'
- ' defining *__slots__* do not support weak references to '
- 'its\n'
- ' instances. If weak reference support is needed, then add\n'
- ' "\'__weakref__\'" to the sequence of strings in the '
- '*__slots__*\n'
- ' declaration.\n'
+ 'classes defining\n'
+ ' *__slots__* do not support weak references to its '
+ 'instances. If weak\n'
+ ' reference support is needed, then add "\'__weakref__\'" to '
+ 'the\n'
+ ' sequence of strings in the *__slots__* declaration.\n'
'\n'
'* *__slots__* are implemented at the class level by '
'creating\n'
@@ -8793,23 +8908,22 @@ topics = {'assert': 'The "assert" statement\n'
' attribute would overwrite the descriptor assignment.\n'
'\n'
'* The action of a *__slots__* declaration is not limited to '
- 'the\n'
- ' class where it is defined. *__slots__* declared in '
- 'parents are\n'
- ' available in child classes. However, child subclasses will '
- 'get a\n'
- ' *__dict__* and *__weakref__* unless they also define '
- '*__slots__*\n'
- ' (which should only contain names of any *additional* '
- 'slots).\n'
+ 'the class\n'
+ ' where it is defined. *__slots__* declared in parents are '
+ 'available\n'
+ ' in child classes. However, child subclasses will get a '
+ '*__dict__*\n'
+ ' and *__weakref__* unless they also define *__slots__* '
+ '(which should\n'
+ ' only contain names of any *additional* slots).\n'
'\n'
'* If a class defines a slot also defined in a base class, '
- 'the\n'
- ' instance variable defined by the base class slot is '
- 'inaccessible\n'
- ' (except by retrieving its descriptor directly from the '
- 'base class).\n'
- ' This renders the meaning of the program undefined. In the '
+ 'the instance\n'
+ ' variable defined by the base class slot is inaccessible '
+ '(except by\n'
+ ' retrieving its descriptor directly from the base class). '
+ 'This\n'
+ ' renders the meaning of the program undefined. In the '
'future, a\n'
' check may be added to prevent this.\n'
'\n'
@@ -8819,9 +8933,9 @@ topics = {'assert': 'The "assert" statement\n'
'and "tuple".\n'
'\n'
'* Any non-string iterable may be assigned to *__slots__*. '
- 'Mappings\n'
- ' may also be used; however, in the future, special meaning '
- 'may be\n'
+ 'Mappings may\n'
+ ' also be used; however, in the future, special meaning may '
+ 'be\n'
' assigned to the values corresponding to each key.\n'
'\n'
'* *__class__* assignment works only if both classes have the '
@@ -8837,8 +8951,8 @@ topics = {'assert': 'The "assert" statement\n'
' raise "TypeError".\n'
'\n'
'* If an iterator is used for *__slots__* then a descriptor '
- 'is\n'
- ' created for each of the iterator’s values. However, the '
+ 'is created\n'
+ ' for each of the iterator’s values. However, the '
'*__slots__*\n'
' attribute will be an empty iterator.\n'
'\n'
@@ -8891,9 +9005,11 @@ topics = {'assert': 'The "assert" statement\n'
'does nothing,\n'
' but raises an error if it is called with any arguments.\n'
'\n'
- ' Note: The metaclass hint "metaclass" is consumed by the '
- 'rest of\n'
- ' the type machinery, and is never passed to '
+ ' Note:\n'
+ '\n'
+ ' The metaclass hint "metaclass" is consumed by the rest '
+ 'of the\n'
+ ' type machinery, and is never passed to '
'"__init_subclass__"\n'
' implementations. The actual metaclass (rather than the '
'explicit\n'
@@ -8961,9 +9077,10 @@ topics = {'assert': 'The "assert" statement\n'
'tuple may\n'
'be empty, in such case the original base is ignored.\n'
'\n'
- 'See also: **PEP 560** - Core support for typing module and '
- 'generic\n'
- ' types\n'
+ 'See also:\n'
+ '\n'
+ ' **PEP 560** - Core support for typing module and generic '
+ 'types\n'
'\n'
'\n'
'Determining the appropriate metaclass\n'
@@ -9221,9 +9338,10 @@ topics = {'assert': 'The "assert" statement\n'
'type hints,\n'
'other usage is discouraged.\n'
'\n'
- 'See also: **PEP 560** - Core support for typing module and '
- 'generic\n'
- ' types\n'
+ 'See also:\n'
+ '\n'
+ ' **PEP 560** - Core support for typing module and generic '
+ 'types\n'
'\n'
'\n'
'Emulating callable objects\n'
@@ -9233,8 +9351,8 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' Called when the instance is “called” as a function; if '
'this method\n'
- ' is defined, "x(arg1, arg2, ...)" is a shorthand for\n'
- ' "x.__call__(arg1, arg2, ...)".\n'
+ ' is defined, "x(arg1, arg2, ...)" roughly translates to\n'
+ ' "type(x).__call__(x, arg1, ...)".\n'
'\n'
'\n'
'Emulating container types\n'
@@ -9335,9 +9453,11 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' New in version 3.4.\n'
'\n'
- 'Note: Slicing is done exclusively with the following three '
- 'methods.\n'
- ' A call like\n'
+ 'Note:\n'
+ '\n'
+ ' Slicing is done exclusively with the following three '
+ 'methods. A\n'
+ ' call like\n'
'\n'
' a[1:2] = b\n'
'\n'
@@ -9368,8 +9488,10 @@ topics = {'assert': 'The "assert" statement\n'
'the\n'
' container), "KeyError" should be raised.\n'
'\n'
- ' Note: "for" loops expect that an "IndexError" will be '
- 'raised for\n'
+ ' Note:\n'
+ '\n'
+ ' "for" loops expect that an "IndexError" will be raised '
+ 'for\n'
' illegal indexes to allow proper detection of the end of '
'the\n'
' sequence.\n'
@@ -9559,15 +9681,18 @@ topics = {'assert': 'The "assert" statement\n'
'"__rpow__()" (the\n'
' coercion rules would become too complicated).\n'
'\n'
- ' Note: If the right operand’s type is a subclass of the '
- 'left\n'
- ' operand’s type and that subclass provides the reflected '
- 'method\n'
- ' for the operation, this method will be called before '
- 'the left\n'
- ' operand’s non-reflected method. This behavior allows '
- 'subclasses\n'
- ' to override their ancestors’ operations.\n'
+ ' Note:\n'
+ '\n'
+ ' If the right operand’s type is a subclass of the left '
+ 'operand’s\n'
+ ' type and that subclass provides a different '
+ 'implementation of the\n'
+ ' reflected method for the operation, this method will be '
+ 'called\n'
+ ' before the left operand’s non-reflected method. This '
+ 'behavior\n'
+ ' allows subclasses to override their ancestors’ '
+ 'operations.\n'
'\n'
'object.__iadd__(self, other)\n'
'object.__isub__(self, other)\n'
@@ -9611,13 +9736,15 @@ topics = {'assert': 'The "assert" statement\n'
'the data\n'
' model.\n'
'\n'
- ' Note: Due to a bug in the dispatching mechanism for '
- '"**=", a\n'
- ' class that defines "__ipow__()" but returns '
- '"NotImplemented"\n'
- ' would fail to fall back to "x.__pow__(y)" and '
- '"y.__rpow__(x)".\n'
- ' This bug is fixed in Python 3.10.\n'
+ ' Note:\n'
+ '\n'
+ ' Due to a bug in the dispatching mechanism for "**=", a '
+ 'class that\n'
+ ' defines "__ipow__()" but returns "NotImplemented" would '
+ 'fail to\n'
+ ' fall back to "x.__pow__(y)" and "y.__rpow__(x)". This '
+ 'bug is\n'
+ ' fixed in Python 3.10.\n'
'\n'
'object.__neg__(self)\n'
'object.__pos__(self)\n'
@@ -9982,11 +10109,13 @@ topics = {'assert': 'The "assert" statement\n'
'"-1" if\n'
' *sub* is not found.\n'
'\n'
- ' Note: The "find()" method should be used only if you '
- 'need to know\n'
- ' the position of *sub*. To check if *sub* is a '
- 'substring or not,\n'
- ' use the "in" operator:\n'
+ ' Note:\n'
+ '\n'
+ ' The "find()" method should be used only if you need '
+ 'to know the\n'
+ ' position of *sub*. To check if *sub* is a substring '
+ 'or not, use\n'
+ ' the "in" operator:\n'
'\n'
" >>> 'Py' in 'Python'\n"
' True\n'
@@ -10015,8 +10144,9 @@ topics = {'assert': 'The "assert" statement\n'
' formatting options that can be specified in format '
'strings.\n'
'\n'
- ' Note: When formatting a number ("int", "float", '
- '"complex",\n'
+ ' Note:\n'
+ '\n'
+ ' When formatting a number ("int", "float", "complex",\n'
' "decimal.Decimal" and subclasses) with the "n" type '
'(ex:\n'
' "\'{:n}\'.format(1234)"), the function temporarily '
@@ -10863,17 +10993,20 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'2. Unlike in Standard C, exactly two hex digits are required.\n'
'\n'
- '3. In a bytes literal, hexadecimal and octal escapes denote the\n'
- ' byte with the given value. In a string literal, these escapes\n'
- ' denote a Unicode character with the given value.\n'
+ '3. In a bytes literal, hexadecimal and octal escapes denote the '
+ 'byte\n'
+ ' with the given value. In a string literal, these escapes '
+ 'denote a\n'
+ ' Unicode character with the given value.\n'
'\n'
'4. Changed in version 3.3: Support for name aliases [1] has been\n'
' added.\n'
'\n'
'5. Exactly four hex digits are required.\n'
'\n'
- '6. Any Unicode character can be encoded this way. Exactly eight\n'
- ' hex digits are required.\n'
+ '6. Any Unicode character can be encoded this way. Exactly eight '
+ 'hex\n'
+ ' digits are required.\n'
'\n'
'Unlike Standard C, all unrecognized escape sequences are left in '
'the\n'
@@ -11207,6 +11340,27 @@ topics = {'assert': 'The "assert" statement\n'
'representation\n'
' in computers.\n'
'\n'
+ ' The string representations of the Numeric classes, computed by\n'
+ ' "__repr__()" and "__str__()", have the following properties:\n'
+ '\n'
+ ' * They are valid numeric literals which, when passed to their '
+ 'class\n'
+ ' constructor, produce an object having the value of the '
+ 'original\n'
+ ' numeric.\n'
+ '\n'
+ ' * The representation is in base 10, when possible.\n'
+ '\n'
+ ' * Leading zeros, possibly excepting a single zero before a '
+ 'decimal\n'
+ ' point, are not shown.\n'
+ '\n'
+ ' * Trailing zeros, possibly excepting a single zero after a '
+ 'decimal\n'
+ ' point, are not shown.\n'
+ '\n'
+ ' * A sign is shown only when the number is negative.\n'
+ '\n'
' Python distinguishes between integers, floating point numbers, '
'and\n'
' complex numbers:\n'
@@ -12258,6 +12412,21 @@ topics = {'assert': 'The "assert" statement\n'
'positional\n'
' argument and a possibly empty set of keyword arguments.\n'
'\n'
+ ' Dictionaries can be created by several means:\n'
+ '\n'
+ ' * Use a comma-separated list of "key: value" pairs within '
+ 'braces:\n'
+ ' "{\'jack\': 4098, \'sjoerd\': 4127}" or "{4098: '
+ "'jack', 4127:\n"
+ ' \'sjoerd\'}"\n'
+ '\n'
+ ' * Use a dict comprehension: "{}", "{x: x ** 2 for x in '
+ 'range(10)}"\n'
+ '\n'
+ ' * Use the type constructor: "dict()", "dict([(\'foo\', '
+ "100), ('bar',\n"
+ ' 200)])", "dict(foo=100, bar=200)"\n'
+ '\n'
' If no positional argument is given, an empty dictionary '
'is created.\n'
' If a positional argument is given and it is a mapping '
@@ -12540,9 +12709,11 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' Changed in version 3.8: Dictionaries are now reversible.\n'
'\n'
- 'See also: "types.MappingProxyType" can be used to create a '
- 'read-only\n'
- ' view of a "dict".\n'
+ 'See also:\n'
+ '\n'
+ ' "types.MappingProxyType" can be used to create a read-only '
+ 'view of a\n'
+ ' "dict".\n'
'\n'
'\n'
'Dictionary view objects\n'
@@ -12926,13 +13097,14 @@ topics = {'assert': 'The "assert" statement\n'
'"None", it\n'
' is treated like "1".\n'
'\n'
- '6. Concatenating immutable sequences always results in a new\n'
- ' object. This means that building up a sequence by repeated\n'
- ' concatenation will have a quadratic runtime cost in the '
- 'total\n'
- ' sequence length. To get a linear runtime cost, you must '
- 'switch to\n'
- ' one of the alternatives below:\n'
+ '6. Concatenating immutable sequences always results in a new '
+ 'object.\n'
+ ' This means that building up a sequence by repeated '
+ 'concatenation\n'
+ ' will have a quadratic runtime cost in the total sequence '
+ 'length.\n'
+ ' To get a linear runtime cost, you must switch to one of the\n'
+ ' alternatives below:\n'
'\n'
' * if concatenating "str" objects, you can build a list and '
'use\n'
@@ -12950,24 +13122,25 @@ topics = {'assert': 'The "assert" statement\n'
' * for other types, investigate the relevant class '
'documentation\n'
'\n'
- '7. Some sequence types (such as "range") only support item\n'
- ' sequences that follow specific patterns, and hence don’t '
- 'support\n'
- ' sequence concatenation or repetition.\n'
- '\n'
- '8. "index" raises "ValueError" when *x* is not found in *s*. '
- 'Not\n'
- ' all implementations support passing the additional arguments '
- '*i*\n'
- ' and *j*. These arguments allow efficient searching of '
- 'subsections\n'
- ' of the sequence. Passing the extra arguments is roughly '
- 'equivalent\n'
- ' to using "s[i:j].index(x)", only without copying any data and '
- 'with\n'
- ' the returned index being relative to the start of the '
+ '7. Some sequence types (such as "range") only support item '
+ 'sequences\n'
+ ' that follow specific patterns, and hence don’t support '
'sequence\n'
- ' rather than the start of the slice.\n'
+ ' concatenation or repetition.\n'
+ '\n'
+ '8. "index" raises "ValueError" when *x* is not found in *s*. Not '
+ 'all\n'
+ ' implementations support passing the additional arguments *i* '
+ 'and\n'
+ ' *j*. These arguments allow efficient searching of subsections '
+ 'of\n'
+ ' the sequence. Passing the extra arguments is roughly '
+ 'equivalent to\n'
+ ' using "s[i:j].index(x)", only without copying any data and '
+ 'with the\n'
+ ' returned index being relative to the start of the sequence '
+ 'rather\n'
+ ' than the start of the slice.\n'
'\n'
'\n'
'Immutable Sequence Types\n'
@@ -13095,17 +13268,17 @@ topics = {'assert': 'The "assert" statement\n'
'1. *t* must have the same length as the slice it is replacing.\n'
'\n'
'2. The optional argument *i* defaults to "-1", so that by '
- 'default\n'
- ' the last item is removed and returned.\n'
+ 'default the\n'
+ ' last item is removed and returned.\n'
'\n'
'3. "remove()" raises "ValueError" when *x* is not found in *s*.\n'
'\n'
- '4. The "reverse()" method modifies the sequence in place for\n'
- ' economy of space when reversing a large sequence. To remind '
- 'users\n'
- ' that it operates by side effect, it does not return the '
- 'reversed\n'
- ' sequence.\n'
+ '4. The "reverse()" method modifies the sequence in place for '
+ 'economy\n'
+ ' of space when reversing a large sequence. To remind users '
+ 'that it\n'
+ ' operates by side effect, it does not return the reversed '
+ 'sequence.\n'
'\n'
'5. "clear()" and "copy()" are included for consistency with the\n'
' interfaces of mutable containers that don’t support slicing\n'
@@ -13142,9 +13315,9 @@ topics = {'assert': 'The "assert" statement\n'
' * Using a pair of square brackets to denote the empty list: '
'"[]"\n'
'\n'
- ' * Using square brackets, separating items with commas: '
- '"[a]",\n'
- ' "[a, b, c]"\n'
+ ' * Using square brackets, separating items with commas: "[a]", '
+ '"[a,\n'
+ ' b, c]"\n'
'\n'
' * Using a list comprehension: "[x for x in iterable]"\n'
'\n'
@@ -13447,9 +13620,9 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'See also:\n'
'\n'
- ' * The linspace recipe shows how to implement a lazy version '
- 'of\n'
- ' range suitable for floating point applications.\n',
+ ' * The linspace recipe shows how to implement a lazy version of '
+ 'range\n'
+ ' suitable for floating point applications.\n',
'typesseq-mutable': 'Mutable Sequence Types\n'
'**********************\n'
'\n'
@@ -13560,19 +13733,18 @@ topics = {'assert': 'The "assert" statement\n'
'replacing.\n'
'\n'
'2. The optional argument *i* defaults to "-1", so that '
- 'by default\n'
- ' the last item is removed and returned.\n'
+ 'by default the\n'
+ ' last item is removed and returned.\n'
'\n'
'3. "remove()" raises "ValueError" when *x* is not found '
'in *s*.\n'
'\n'
'4. The "reverse()" method modifies the sequence in place '
- 'for\n'
- ' economy of space when reversing a large sequence. To '
- 'remind users\n'
- ' that it operates by side effect, it does not return '
- 'the reversed\n'
- ' sequence.\n'
+ 'for economy\n'
+ ' of space when reversing a large sequence. To remind '
+ 'users that it\n'
+ ' operates by side effect, it does not return the '
+ 'reversed sequence.\n'
'\n'
'5. "clear()" and "copy()" are included for consistency '
'with the\n'
@@ -13655,8 +13827,9 @@ topics = {'assert': 'The "assert" statement\n'
'The execution of the "with" statement with one “item” proceeds as\n'
'follows:\n'
'\n'
- '1. The context expression (the expression given in the "with_item")\n'
- ' is evaluated to obtain a context manager.\n'
+ '1. The context expression (the expression given in the "with_item") '
+ 'is\n'
+ ' evaluated to obtain a context manager.\n'
'\n'
'2. The context manager’s "__enter__()" is loaded for later use.\n'
'\n'
@@ -13664,12 +13837,15 @@ topics = {'assert': 'The "assert" statement\n'
'\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'
+ '5. If a target was included in the "with" statement, the return '
+ 'value\n'
+ ' from "__enter__()" is assigned to it.\n'
+ '\n'
+ ' Note:\n'
'\n'
- ' Note: The "with" statement guarantees that if the "__enter__()"\n'
- ' method returns without an error, then "__exit__()" will always '
- 'be\n'
+ ' The "with" statement guarantees that if the "__enter__()" '
+ 'method\n'
+ ' returns without an error, then "__exit__()" will always be\n'
' called. Thus, if an error occurs during the assignment to the\n'
' target list, it will be treated the same as an error occurring\n'
' within the suite would be. See step 6 below.\n'