mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
Python 3.13.0a6
This commit is contained in:
parent
57183241af
commit
57aee2a02c
122 changed files with 1314 additions and 345 deletions
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Autogenerated by Sphinx on Tue Mar 12 18:35:04 2024
|
||||
# Autogenerated by Sphinx on Tue Apr 9 11:53:07 2024
|
||||
# as part of the release process.
|
||||
topics = {'assert': 'The "assert" statement\n'
|
||||
'**********************\n'
|
||||
|
@ -5221,12 +5221,13 @@ topics = {'assert': 'The "assert" statement\n'
|
|||
'the\n'
|
||||
'current directory, it is read with "\'utf-8\'" encoding and '
|
||||
'executed as\n'
|
||||
'if it had been typed at the debugger prompt. This is '
|
||||
'particularly\n'
|
||||
'useful for aliases. If both files exist, the one in the home\n'
|
||||
'directory is read first and aliases defined there can be '
|
||||
'overridden by\n'
|
||||
'the local file.\n'
|
||||
'if it had been typed at the debugger prompt, with the exception '
|
||||
'that\n'
|
||||
'empty lines and lines starting with "#" are ignored. This is\n'
|
||||
'particularly useful for aliases. If both files exist, the one '
|
||||
'in the\n'
|
||||
'home directory is read first and aliases defined there can be\n'
|
||||
'overridden by the local file.\n'
|
||||
'\n'
|
||||
'Changed in version 3.2: ".pdbrc" can now contain commands that\n'
|
||||
'continue debugging, such as "continue" or "next". Previously, '
|
||||
|
@ -8640,32 +8641,36 @@ topics = {'assert': 'The "assert" statement\n'
|
|||
'\n'
|
||||
' nonlocal_stmt ::= "nonlocal" identifier ("," identifier)*\n'
|
||||
'\n'
|
||||
'The "nonlocal" statement causes the listed identifiers to refer '
|
||||
'to\n'
|
||||
'previously bound variables in the nearest enclosing scope '
|
||||
'excluding\n'
|
||||
'globals. This is important because the default behavior for '
|
||||
'binding is\n'
|
||||
'to search the local namespace first. The statement allows\n'
|
||||
'encapsulated code to rebind variables outside of the local '
|
||||
'scope\n'
|
||||
'besides the global (module) scope.\n'
|
||||
'When the definition of a function or class is nested (enclosed) '
|
||||
'within\n'
|
||||
'the definitions of other functions, its nonlocal scopes are the '
|
||||
'local\n'
|
||||
'scopes of the enclosing functions. The "nonlocal" statement '
|
||||
'causes the\n'
|
||||
'listed identifiers to refer to names previously bound in '
|
||||
'nonlocal\n'
|
||||
'scopes. It allows encapsulated code to rebind such nonlocal\n'
|
||||
'identifiers. If a name is bound in more than one nonlocal '
|
||||
'scope, the\n'
|
||||
'nearest binding is used. If a name is not bound in any nonlocal '
|
||||
'scope,\n'
|
||||
'or if there is no nonlocal scope, a "SyntaxError" is raised.\n'
|
||||
'\n'
|
||||
'Names listed in a "nonlocal" statement, unlike those listed in '
|
||||
'a\n'
|
||||
'"global" statement, must refer to pre-existing bindings in an\n'
|
||||
'enclosing scope (the scope in which a new binding should be '
|
||||
'created\n'
|
||||
'cannot be determined unambiguously).\n'
|
||||
'\n'
|
||||
'Names listed in a "nonlocal" statement must not collide with '
|
||||
'pre-\n'
|
||||
'existing bindings in the local scope.\n'
|
||||
'The nonlocal statement applies to the entire scope of a function '
|
||||
'or\n'
|
||||
'class body. A "SyntaxError" is raised if a variable is used or\n'
|
||||
'assigned to prior to its nonlocal declaration in the scope.\n'
|
||||
'\n'
|
||||
'See also:\n'
|
||||
'\n'
|
||||
' **PEP 3104** - Access to Names in Outer Scopes\n'
|
||||
' The specification for the "nonlocal" statement.\n',
|
||||
' The specification for the "nonlocal" statement.\n'
|
||||
'\n'
|
||||
'**Programmer’s note:** "nonlocal" is a directive to the parser '
|
||||
'and\n'
|
||||
'applies only to code parsed along with it. See the note for '
|
||||
'the\n'
|
||||
'"global" statement.\n',
|
||||
'numbers': 'Numeric literals\n'
|
||||
'****************\n'
|
||||
'\n'
|
||||
|
@ -13805,14 +13810,18 @@ topics = {'assert': 'The "assert" statement\n'
|
|||
'contains\n'
|
||||
'the numbers 0, 1, …, *n*-1. Item *i* of sequence *a* is selected '
|
||||
'by\n'
|
||||
'"a[i]".\n'
|
||||
'"a[i]". Some sequences, including built-in sequences, interpret\n'
|
||||
'negative subscripts by adding the sequence length. For example,\n'
|
||||
'"a[-2]" equals "a[n-2]", the second to last item of sequence a '
|
||||
'with\n'
|
||||
'length "n".\n'
|
||||
'\n'
|
||||
'Sequences also support slicing: "a[i:j]" selects all items with '
|
||||
'index\n'
|
||||
'*k* such that *i* "<=" *k* "<" *j*. When used as an expression, a\n'
|
||||
'slice is a sequence of the same type. This implies that the index '
|
||||
'set\n'
|
||||
'is renumbered so that it starts at 0.\n'
|
||||
'slice is a sequence of the same type. The comment above about '
|
||||
'negative\n'
|
||||
'indexes also applies to negative slice positions.\n'
|
||||
'\n'
|
||||
'Some sequences also support “extended slicing” with a third “step”\n'
|
||||
'parameter: "a[i:j:k]" selects all items of *a* with index *x* where '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue