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.py339
1 files changed, 252 insertions, 87 deletions
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index 3aaaee6..cb74299 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 Apr 4 17:52:21 2023
+# Autogenerated by Sphinx on Mon May 22 14:02:15 2023
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
@@ -2573,9 +2573,12 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'Any remaining exceptions that were not handled by any "except*" '
'clause\n'
- 'are re-raised at the end, combined into an exception group along '
- 'with\n'
- 'all exceptions that were raised from within "except*" clauses.\n'
+ 'are re-raised at the end, along with all exceptions that were '
+ 'raised\n'
+ 'from within the "except*" clauses. If this list contains more '
+ 'than one\n'
+ 'exception to reraise, they are combined into an exception '
+ 'group.\n'
'\n'
'If the raised exception is not an exception group and its type '
'matches\n'
@@ -4587,8 +4590,7 @@ topics = {'assert': 'The "assert" statement\n'
'case\n'
' performance of a dict insertion, O(n^2) complexity. '
'See\n'
- ' http://www.ocert.org/advisories/ocert-2011-003.html '
- 'for\n'
+ ' http://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 '
@@ -4651,20 +4653,41 @@ topics = {'assert': 'The "assert" statement\n'
'traces of\n'
' Python programs.\n'
'\n'
- 'The debugger’s prompt is "(Pdb)". Typical usage to run a program '
- 'under\n'
- 'control of the debugger is:\n'
+ 'The typical usage to break into the debugger is to insert:\n'
'\n'
- ' >>> import pdb\n'
- ' >>> import mymodule\n'
- " >>> pdb.run('mymodule.test()')\n"
- ' > <string>(0)?()\n'
- ' (Pdb) continue\n'
- ' > <string>(1)?()\n'
+ ' import pdb; pdb.set_trace()\n'
+ '\n'
+ 'Or:\n'
+ '\n'
+ ' breakpoint()\n'
+ '\n'
+ 'at the location you want to break into the debugger, and then '
+ 'run the\n'
+ 'program. You can then step through the code following this '
+ 'statement,\n'
+ 'and continue running without the debugger using the "continue"\n'
+ 'command.\n'
+ '\n'
+ 'New in version 3.7: The built-in "breakpoint()", when called '
+ 'with\n'
+ 'defaults, can be used instead of "import pdb; pdb.set_trace()".\n'
+ '\n'
+ ' def double(x):\n'
+ ' breakpoint()\n'
+ ' return x * 2\n'
+ ' val = 3\n'
+ ' print(f"{val} * 2 is {double(val)}")\n'
+ '\n'
+ 'The debugger’s prompt is "(Pdb)", which is the indicator that '
+ 'you are\n'
+ 'in debug mode:\n'
+ '\n'
+ ' > ...(3)double()\n'
+ ' -> return x * 2\n'
+ ' (Pdb) p x\n'
+ ' 3\n'
' (Pdb) continue\n'
- " NameError: 'spam'\n"
- ' > <string>(1)?()\n'
- ' (Pdb)\n'
+ ' 3 * 2 is 6\n'
'\n'
'Changed in version 3.3: Tab-completion via the "readline" module '
'is\n'
@@ -4672,13 +4695,12 @@ topics = {'assert': 'The "assert" statement\n'
'global\n'
'and local names are offered as arguments of the "p" command.\n'
'\n'
- '"pdb.py" can also be invoked as a script to debug other '
- 'scripts. For\n'
- 'example:\n'
+ 'You can also invoke "pdb" from the command line to debug other\n'
+ 'scripts. For example:\n'
'\n'
' python -m pdb myscript.py\n'
'\n'
- 'When invoked as a script, pdb will automatically enter '
+ 'When invoked as a module, pdb will automatically enter '
'post-mortem\n'
'debugging if the program being debugged exits abnormally. After '
'post-\n'
@@ -4690,47 +4712,43 @@ topics = {'assert': 'The "assert" statement\n'
'the\n'
'debugger upon program’s exit.\n'
'\n'
- 'New in version 3.2: "pdb.py" now accepts a "-c" option that '
- 'executes\n'
- 'commands as if given in a ".pdbrc" file, see Debugger Commands.\n'
+ 'New in version 3.2: "-c" option is introduced to execute '
+ 'commands as\n'
+ 'if given in a ".pdbrc" file, see Debugger Commands.\n'
'\n'
- 'New in version 3.7: "pdb.py" now accepts a "-m" option that '
- 'execute\n'
- 'modules similar to the way "python -m" does. As with a script, '
- 'the\n'
- 'debugger will pause execution just before the first line of the\n'
- 'module.\n'
- '\n'
- 'The typical usage to break into the debugger is to insert:\n'
+ 'New in version 3.7: "-m" option is introduced to execute '
+ 'modules\n'
+ 'similar to the way "python -m" does. As with a script, the '
+ 'debugger\n'
+ 'will pause execution just before the first line of the module.\n'
'\n'
- ' import pdb; pdb.set_trace()\n'
+ 'Typical usage to execute a statement under control of the '
+ 'debugger is:\n'
'\n'
- 'at the location you want to break into the debugger, and then '
- 'run the\n'
- 'program. You can then step through the code following this '
- 'statement,\n'
- 'and continue running without the debugger using the "continue"\n'
- 'command.\n'
- '\n'
- 'New in version 3.7: The built-in "breakpoint()", when called '
- 'with\n'
- 'defaults, can be used instead of "import pdb; pdb.set_trace()".\n'
+ ' >>> import pdb\n'
+ ' >>> def f(x):\n'
+ ' ... print(1 / x)\n'
+ ' >>> pdb.run("f(2)")\n'
+ ' > <string>(1)<module>()\n'
+ ' (Pdb) continue\n'
+ ' 0.5\n'
+ ' >>>\n'
'\n'
'The typical usage to inspect a crashed program is:\n'
'\n'
' >>> import pdb\n'
- ' >>> import mymodule\n'
- ' >>> mymodule.test()\n'
+ ' >>> def f(x):\n'
+ ' ... print(1 / x)\n'
+ ' ...\n'
+ ' >>> f(0)\n'
' Traceback (most recent call last):\n'
' File "<stdin>", line 1, in <module>\n'
- ' File "./mymodule.py", line 4, in test\n'
- ' test2()\n'
- ' File "./mymodule.py", line 3, in test2\n'
- ' print(spam)\n'
- ' NameError: spam\n'
+ ' File "<stdin>", line 2, in f\n'
+ ' ZeroDivisionError: division by zero\n'
' >>> pdb.pm()\n'
- ' > ./mymodule.py(3)test2()\n'
- ' -> print(spam)\n'
+ ' > <stdin>(2)f()\n'
+ ' (Pdb) p x\n'
+ ' 0\n'
' (Pdb)\n'
'\n'
'The module defines the following functions; each enters the '
@@ -4914,6 +4932,29 @@ topics = {'assert': 'The "assert" statement\n'
'implicit\n'
'string concatenation "\';\'\';\'" or "";"";"".\n'
'\n'
+ 'To set a temporary global variable, use a *convenience '
+ 'variable*. A\n'
+ '*convenience variable* is a variable whose name starts with '
+ '"$". For\n'
+ 'example, "$foo = 1" sets a global variable "$foo" which you can '
+ 'use in\n'
+ 'the debugger session. The *convenience variables* are cleared '
+ 'when\n'
+ 'the program resumes execution so it’s less likely to interfere '
+ 'with\n'
+ 'your program compared to using normal variables like "foo = 1".\n'
+ '\n'
+ 'There are three preset *convenience variables*:\n'
+ '\n'
+ '* "$_frame": the current frame you are debugging\n'
+ '\n'
+ '* "$_retval": the return value if the frame is returning\n'
+ '\n'
+ '* "$_exception": the exception if the frame is raising an '
+ 'exception\n'
+ '\n'
+ 'New in version 3.12.\n'
+ '\n'
'If a file ".pdbrc" exists in the user’s home directory or in '
'the\n'
'current directory, it is read with "\'utf-8\'" encoding and '
@@ -4949,9 +4990,9 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' Print a stack trace, with the most recent frame at the '
'bottom. An\n'
- ' arrow indicates the current frame, which determines the '
- 'context of\n'
- ' most commands.\n'
+ ' arrow (">") indicates the current frame, which determines '
+ 'the\n'
+ ' context of most commands.\n'
'\n'
'd(own) [count]\n'
'\n'
@@ -5007,7 +5048,7 @@ topics = {'assert': 'The "assert" statement\n'
'first\n'
' ask confirmation).\n'
'\n'
- 'disable [bpnumber ...]\n'
+ 'disable bpnumber [bpnumber ...]\n'
'\n'
' Disable the breakpoints given as a space separated list of\n'
' breakpoint numbers. Disabling a breakpoint means it cannot '
@@ -5016,7 +5057,7 @@ topics = {'assert': 'The "assert" statement\n'
'breakpoint, it\n'
' remains in the list of breakpoints and can be (re-)enabled.\n'
'\n'
- 'enable [bpnumber ...]\n'
+ 'enable bpnumber [bpnumber ...]\n'
'\n'
' Enable the breakpoints specified.\n'
'\n'
@@ -5179,7 +5220,9 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'a(rgs)\n'
'\n'
- ' Print the argument list of the current function.\n'
+ ' Print the arguments of the current function and their '
+ 'current\n'
+ ' values.\n'
'\n'
'p expression\n'
'\n'
@@ -5217,6 +5260,54 @@ topics = {'assert': 'The "assert" statement\n'
'current\n'
' frame.\n'
'\n'
+ ' Note:\n'
+ '\n'
+ ' Display evaluates *expression* and compares to the result '
+ 'of the\n'
+ ' previous evaluation of *expression*, so when the result is\n'
+ ' mutable, display may not be able to pick up the changes.\n'
+ '\n'
+ ' Example:\n'
+ '\n'
+ ' lst = []\n'
+ ' breakpoint()\n'
+ ' pass\n'
+ ' lst.append(1)\n'
+ ' print(lst)\n'
+ '\n'
+ ' Display won’t realize "lst" has been changed because the '
+ 'result of\n'
+ ' evaluation is modified in place by "lst.append(1)" before '
+ 'being\n'
+ ' compared:\n'
+ '\n'
+ ' > example.py(3)<module>()\n'
+ ' -> pass\n'
+ ' (Pdb) display lst\n'
+ ' display lst: []\n'
+ ' (Pdb) n\n'
+ ' > example.py(4)<module>()\n'
+ ' -> lst.append(1)\n'
+ ' (Pdb) n\n'
+ ' > example.py(5)<module>()\n'
+ ' -> print(lst)\n'
+ ' (Pdb)\n'
+ '\n'
+ ' You can do some tricks with copy mechanism to make it work:\n'
+ '\n'
+ ' > example.py(3)<module>()\n'
+ ' -> pass\n'
+ ' (Pdb) display lst[:]\n'
+ ' display lst[:]: []\n'
+ ' (Pdb) n\n'
+ ' > example.py(4)<module>()\n'
+ ' -> lst.append(1)\n'
+ ' (Pdb) n\n'
+ ' > example.py(5)<module>()\n'
+ ' -> print(lst)\n'
+ ' display lst[:]: [1] [old: []]\n'
+ ' (Pdb)\n'
+ '\n'
' New in version 3.2.\n'
'\n'
'undisplay [expression]\n'
@@ -5283,14 +5374,14 @@ topics = {'assert': 'The "assert" statement\n'
'current\n'
' stack frame. The exclamation point can be omitted unless the '
'first\n'
- ' word of the statement resembles a debugger command, e.g.:'
+ ' word of the statement resembles a debugger command, e.g.:\n'
'\n'
' (Pdb) ! n=42\n'
' (Pdb)\n'
'\n'
- ' To set a global variable, you can prefix the assignment command '
- ' with \n'
- ' a "global" statement on the same line, e.g.:\n'
+ ' To set a global variable, you can prefix the assignment '
+ 'command\n'
+ ' with a "global" statement on the same line, e.g.:\n'
'\n'
" (Pdb) global list_options; list_options = ['-l']\n"
' (Pdb)\n'
@@ -5321,7 +5412,8 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'retval\n'
'\n'
- ' Print the return value for the last return of a function.\n'
+ ' Print the return value for the last return of the current '
+ 'function.\n'
'\n'
'-[ Footnotes ]-\n'
'\n'
@@ -9509,8 +9601,7 @@ topics = {'assert': 'The "assert" statement\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'
+ ' http://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 '
@@ -10164,20 +10255,37 @@ topics = {'assert': 'The "assert" statement\n'
'Resolving MRO entries\n'
'---------------------\n'
'\n'
- 'If a base that appears in class definition is not an '
+ 'object.__mro_entries__(self, bases)\n'
+ '\n'
+ ' If a base that appears in a class definition is not an '
'instance of\n'
- '"type", then an "__mro_entries__" method is searched on it. '
- 'If found,\n'
- 'it is called with the original bases tuple. This method must '
- 'return a\n'
- 'tuple of classes that will be used instead of this base. The '
- 'tuple may\n'
- 'be empty, in such case the original base is ignored.\n'
+ ' "type", then an "__mro_entries__()" method is searched on '
+ 'the base.\n'
+ ' If an "__mro_entries__()" method is found, the base is '
+ 'substituted\n'
+ ' with the result of a call to "__mro_entries__()" when '
+ 'creating the\n'
+ ' class. The method is called with the original bases tuple '
+ 'passed to\n'
+ ' the *bases* parameter, and must return a tuple of classes '
+ 'that will\n'
+ ' be used instead of the base. The returned tuple may be '
+ 'empty: in\n'
+ ' these cases, the original base is ignored.\n'
'\n'
'See also:\n'
'\n'
- ' **PEP 560** - Core support for typing module and generic '
- 'types\n'
+ ' "types.resolve_bases()"\n'
+ ' Dynamically resolve bases that are not instances of '
+ '"type".\n'
+ '\n'
+ ' "types.get_original_bases()"\n'
+ ' Retrieve a class’s “original bases” prior to '
+ 'modifications by\n'
+ ' "__mro_entries__()".\n'
+ '\n'
+ ' **PEP 560**\n'
+ ' Core support for typing module and generic types.\n'
'\n'
'\n'
'Determining the appropriate metaclass\n'
@@ -11153,6 +11261,61 @@ topics = {'assert': 'The "assert" statement\n'
' The specification for the Python "match" statement.\n'
'\n'
'\n'
+ 'Emulating buffer types\n'
+ '======================\n'
+ '\n'
+ 'The buffer protocol provides a way for Python objects to '
+ 'expose\n'
+ 'efficient access to a low-level memory array. This protocol '
+ 'is\n'
+ 'implemented by builtin types such as "bytes" and '
+ '"memoryview", and\n'
+ 'third-party libraries may define additional buffer types.\n'
+ '\n'
+ 'While buffer types are usually implemented in C, it is also '
+ 'possible\n'
+ 'to implement the protocol in Python.\n'
+ '\n'
+ 'object.__buffer__(self, flags)\n'
+ '\n'
+ ' Called when a buffer is requested from *self* (for '
+ 'example, by the\n'
+ ' "memoryview" constructor). The *flags* argument is an '
+ 'integer\n'
+ ' representing the kind of buffer requested, affecting for '
+ 'example\n'
+ ' whether the returned buffer is read-only or writable.\n'
+ ' "inspect.BufferFlags" provides a convenient way to '
+ 'interpret the\n'
+ ' flags. The method must return a "memoryview" object.\n'
+ '\n'
+ 'object.__release_buffer__(self, buffer)\n'
+ '\n'
+ ' Called when a buffer is no longer needed. The *buffer* '
+ 'argument is\n'
+ ' a "memoryview" object that was previously returned by\n'
+ ' "__buffer__()". The method must release any resources '
+ 'associated\n'
+ ' with the buffer. This method should return "None". Buffer '
+ 'objects\n'
+ ' that do not need to perform any cleanup are not required '
+ 'to\n'
+ ' implement this method.\n'
+ '\n'
+ 'New in version 3.12.\n'
+ '\n'
+ 'See also:\n'
+ '\n'
+ ' **PEP 688** - Making the buffer protocol accessible in '
+ 'Python\n'
+ ' Introduces the Python "__buffer__" and '
+ '"__release_buffer__"\n'
+ ' methods.\n'
+ '\n'
+ ' "collections.abc.Buffer"\n'
+ ' ABC for buffer types.\n'
+ '\n'
+ '\n'
'Special method lookup\n'
'=====================\n'
'\n'
@@ -11300,8 +11463,8 @@ topics = {'assert': 'The "assert" statement\n'
' "casefold()" converts it to ""ss"".\n'
'\n'
' The casefolding algorithm is described in section 3.13 '
- 'of the\n'
- ' Unicode Standard.\n'
+ '‘Default\n'
+ ' Case Folding’ of the Unicode Standard.\n'
'\n'
' New in version 3.3.\n'
'\n'
@@ -11519,8 +11682,9 @@ topics = {'assert': 'The "assert" statement\n'
' being one of “Lm”, “Lt”, “Lu”, “Ll”, or “Lo”. Note '
'that this is\n'
' different from the Alphabetic property defined in the '
- 'Unicode\n'
- ' Standard.\n'
+ 'section 4.10\n'
+ ' ‘Letters, Alphabetic, and Ideographic’ of the Unicode '
+ 'Standard.\n'
'\n'
'str.isascii()\n'
'\n'
@@ -11692,8 +11856,8 @@ topics = {'assert': 'The "assert" statement\n'
' converted to lowercase.\n'
'\n'
' The lowercasing algorithm used is described in section '
- '3.13 of the\n'
- ' Unicode Standard.\n'
+ '3.13\n'
+ ' ‘Default Case Folding’ of the Unicode Standard.\n'
'\n'
'str.lstrip([chars])\n'
'\n'
@@ -12159,8 +12323,8 @@ topics = {'assert': 'The "assert" statement\n'
' uppercase), but e.g. “Lt” (Letter, titlecase).\n'
'\n'
' The uppercasing algorithm used is described in section '
- '3.13 of the\n'
- ' Unicode Standard.\n'
+ '3.13\n'
+ ' ‘Default Case Folding’ of the Unicode Standard.\n'
'\n'
'str.zfill(width)\n'
'\n'
@@ -12704,9 +12868,10 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'Any remaining exceptions that were not handled by any "except*" '
'clause\n'
- 'are re-raised at the end, combined into an exception group along '
- 'with\n'
- 'all exceptions that were raised from within "except*" clauses.\n'
+ 'are re-raised at the end, along with all exceptions that were raised\n'
+ 'from within the "except*" clauses. If this list contains more than '
+ 'one\n'
+ 'exception to reraise, they are combined into an exception group.\n'
'\n'
'If the raised exception is not an exception group and its type '
'matches\n'