summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc_data
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2024-04-09 09:52:31 (GMT)
committerThomas Wouters <thomas@python.org>2024-04-09 09:56:22 (GMT)
commit57aee2a02ce38be30cf6c310245547cf56562ab6 (patch)
tree4be715c6136078128daed987a3b0209e18e6abfd /Lib/pydoc_data
parent57183241af76bf33e44d886a733f799d20fc680c (diff)
downloadcpython-57aee2a02ce38be30cf6c310245547cf56562ab6.zip
cpython-57aee2a02ce38be30cf6c310245547cf56562ab6.tar.gz
cpython-57aee2a02ce38be30cf6c310245547cf56562ab6.tar.bz2
Python 3.13.0a6v3.13.0a6
Diffstat (limited to 'Lib/pydoc_data')
-rw-r--r--Lib/pydoc_data/topics.py75
1 files changed, 42 insertions, 33 deletions
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index 05045ac..43c47c2 100644
--- a/Lib/pydoc_data/topics.py
+++ b/Lib/pydoc_data/topics.py
@@ -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'
- '\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'
+ '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'
+ '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 '