|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | -# Autogenerated by Sphinx on Tue Mar 12 18:35:04 2024 |
| 2 | +# Autogenerated by Sphinx on Tue Apr 9 11:53:07 2024 |
3 | 3 | # as part of the release process. |
4 | 4 | topics = {'assert': 'The "assert" statement\n' |
5 | 5 | '**********************\n' |
|
5221 | 5221 | 'the\n' |
5222 | 5222 | 'current directory, it is read with "\'utf-8\'" encoding and ' |
5223 | 5223 | 'executed as\n' |
5224 | | - 'if it had been typed at the debugger prompt. This is ' |
5225 | | - 'particularly\n' |
5226 | | - 'useful for aliases. If both files exist, the one in the home\n' |
5227 | | - 'directory is read first and aliases defined there can be ' |
5228 | | - 'overridden by\n' |
5229 | | - 'the local file.\n' |
| 5224 | + 'if it had been typed at the debugger prompt, with the exception ' |
| 5225 | + 'that\n' |
| 5226 | + 'empty lines and lines starting with "#" are ignored. This is\n' |
| 5227 | + 'particularly useful for aliases. If both files exist, the one ' |
| 5228 | + 'in the\n' |
| 5229 | + 'home directory is read first and aliases defined there can be\n' |
| 5230 | + 'overridden by the local file.\n' |
5230 | 5231 | '\n' |
5231 | 5232 | 'Changed in version 3.2: ".pdbrc" can now contain commands that\n' |
5232 | 5233 | 'continue debugging, such as "continue" or "next". Previously, ' |
|
8640 | 8641 | '\n' |
8641 | 8642 | ' nonlocal_stmt ::= "nonlocal" identifier ("," identifier)*\n' |
8642 | 8643 | '\n' |
8643 | | - 'The "nonlocal" statement causes the listed identifiers to refer ' |
8644 | | - 'to\n' |
8645 | | - 'previously bound variables in the nearest enclosing scope ' |
8646 | | - 'excluding\n' |
8647 | | - 'globals. This is important because the default behavior for ' |
8648 | | - 'binding is\n' |
8649 | | - 'to search the local namespace first. The statement allows\n' |
8650 | | - 'encapsulated code to rebind variables outside of the local ' |
8651 | | - 'scope\n' |
8652 | | - 'besides the global (module) scope.\n' |
8653 | | - '\n' |
8654 | | - 'Names listed in a "nonlocal" statement, unlike those listed in ' |
8655 | | - 'a\n' |
8656 | | - '"global" statement, must refer to pre-existing bindings in an\n' |
8657 | | - 'enclosing scope (the scope in which a new binding should be ' |
8658 | | - 'created\n' |
8659 | | - 'cannot be determined unambiguously).\n' |
8660 | | - '\n' |
8661 | | - 'Names listed in a "nonlocal" statement must not collide with ' |
8662 | | - 'pre-\n' |
8663 | | - 'existing bindings in the local scope.\n' |
| 8644 | + 'When the definition of a function or class is nested (enclosed) ' |
| 8645 | + 'within\n' |
| 8646 | + 'the definitions of other functions, its nonlocal scopes are the ' |
| 8647 | + 'local\n' |
| 8648 | + 'scopes of the enclosing functions. The "nonlocal" statement ' |
| 8649 | + 'causes the\n' |
| 8650 | + 'listed identifiers to refer to names previously bound in ' |
| 8651 | + 'nonlocal\n' |
| 8652 | + 'scopes. It allows encapsulated code to rebind such nonlocal\n' |
| 8653 | + 'identifiers. If a name is bound in more than one nonlocal ' |
| 8654 | + 'scope, the\n' |
| 8655 | + 'nearest binding is used. If a name is not bound in any nonlocal ' |
| 8656 | + 'scope,\n' |
| 8657 | + 'or if there is no nonlocal scope, a "SyntaxError" is raised.\n' |
| 8658 | + '\n' |
| 8659 | + 'The nonlocal statement applies to the entire scope of a function ' |
| 8660 | + 'or\n' |
| 8661 | + 'class body. A "SyntaxError" is raised if a variable is used or\n' |
| 8662 | + 'assigned to prior to its nonlocal declaration in the scope.\n' |
8664 | 8663 | '\n' |
8665 | 8664 | 'See also:\n' |
8666 | 8665 | '\n' |
8667 | 8666 | ' **PEP 3104** - Access to Names in Outer Scopes\n' |
8668 | | - ' The specification for the "nonlocal" statement.\n', |
| 8667 | + ' The specification for the "nonlocal" statement.\n' |
| 8668 | + '\n' |
| 8669 | + '**Programmer’s note:** "nonlocal" is a directive to the parser ' |
| 8670 | + 'and\n' |
| 8671 | + 'applies only to code parsed along with it. See the note for ' |
| 8672 | + 'the\n' |
| 8673 | + '"global" statement.\n', |
8669 | 8674 | 'numbers': 'Numeric literals\n' |
8670 | 8675 | '****************\n' |
8671 | 8676 | '\n' |
@@ -13805,14 +13810,18 @@ |
13805 | 13810 | 'contains\n' |
13806 | 13811 | 'the numbers 0, 1, …, *n*-1. Item *i* of sequence *a* is selected ' |
13807 | 13812 | 'by\n' |
13808 | | - '"a[i]".\n' |
| 13813 | + '"a[i]". Some sequences, including built-in sequences, interpret\n' |
| 13814 | + 'negative subscripts by adding the sequence length. For example,\n' |
| 13815 | + '"a[-2]" equals "a[n-2]", the second to last item of sequence a ' |
| 13816 | + 'with\n' |
| 13817 | + 'length "n".\n' |
13809 | 13818 | '\n' |
13810 | 13819 | 'Sequences also support slicing: "a[i:j]" selects all items with ' |
13811 | 13820 | 'index\n' |
13812 | 13821 | '*k* such that *i* "<=" *k* "<" *j*. When used as an expression, a\n' |
13813 | | - 'slice is a sequence of the same type. This implies that the index ' |
13814 | | - 'set\n' |
13815 | | - 'is renumbered so that it starts at 0.\n' |
| 13822 | + 'slice is a sequence of the same type. The comment above about ' |
| 13823 | + 'negative\n' |
| 13824 | + 'indexes also applies to negative slice positions.\n' |
13816 | 13825 | '\n' |
13817 | 13826 | 'Some sequences also support “extended slicing” with a third “step”\n' |
13818 | 13827 | 'parameter: "a[i:j:k]" selects all items of *a* with index *x* where ' |
|
0 commit comments