|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | -# Autogenerated by Sphinx on Tue Apr 4 23:22:02 2023 |
| 2 | +# Autogenerated by Sphinx on Tue Jun 6 23:00:07 2023 |
3 | 3 | topics = {'assert': 'The "assert" statement\n' |
4 | 4 | '**********************\n' |
5 | 5 | '\n' |
|
2577 | 2577 | 'with\n' |
2578 | 2578 | 'all exceptions that were raised from within "except*" clauses.\n' |
2579 | 2579 | '\n' |
| 2580 | + 'From version 3.11.4, when the entire "ExceptionGroup" is handled ' |
| 2581 | + 'and\n' |
| 2582 | + 'only one exception is raised from an "except*" clause, this ' |
| 2583 | + 'exception\n' |
| 2584 | + 'is no longer wrapped to form a new "ExceptionGroup".\n' |
| 2585 | + '\n' |
2580 | 2586 | 'If the raised exception is not an exception group and its type ' |
2581 | 2587 | 'matches\n' |
2582 | 2588 | 'one of the "except*" clauses, it is caught and wrapped by an ' |
|
4587 | 4593 | 'case\n' |
4588 | 4594 | ' performance of a dict insertion, O(n^2) complexity. ' |
4589 | 4595 | 'See\n' |
4590 | | - ' http://www.ocert.org/advisories/ocert-2011-003.html ' |
4591 | | - 'for\n' |
| 4596 | + ' http://ocert.org/advisories/ocert-2011-003.html for\n' |
4592 | 4597 | ' details.Changing hash values affects the iteration ' |
4593 | 4598 | 'order of sets.\n' |
4594 | 4599 | ' Python has never made guarantees about this ordering ' |
|
4651 | 4656 | 'traces of\n' |
4652 | 4657 | ' Python programs.\n' |
4653 | 4658 | '\n' |
4654 | | - 'The debugger’s prompt is "(Pdb)". Typical usage to run a program ' |
4655 | | - 'under\n' |
4656 | | - 'control of the debugger is:\n' |
| 4659 | + 'The typical usage to break into the debugger is to insert:\n' |
4657 | 4660 | '\n' |
4658 | | - ' >>> import pdb\n' |
4659 | | - ' >>> import mymodule\n' |
4660 | | - " >>> pdb.run('mymodule.test()')\n" |
4661 | | - ' > <string>(0)?()\n' |
4662 | | - ' (Pdb) continue\n' |
4663 | | - ' > <string>(1)?()\n' |
| 4661 | + ' import pdb; pdb.set_trace()\n' |
| 4662 | + '\n' |
| 4663 | + 'Or:\n' |
| 4664 | + '\n' |
| 4665 | + ' breakpoint()\n' |
| 4666 | + '\n' |
| 4667 | + 'at the location you want to break into the debugger, and then ' |
| 4668 | + 'run the\n' |
| 4669 | + 'program. You can then step through the code following this ' |
| 4670 | + 'statement,\n' |
| 4671 | + 'and continue running without the debugger using the "continue"\n' |
| 4672 | + 'command.\n' |
| 4673 | + '\n' |
| 4674 | + 'New in version 3.7: The built-in "breakpoint()", when called ' |
| 4675 | + 'with\n' |
| 4676 | + 'defaults, can be used instead of "import pdb; pdb.set_trace()".\n' |
| 4677 | + '\n' |
| 4678 | + ' def double(x):\n' |
| 4679 | + ' breakpoint()\n' |
| 4680 | + ' return x * 2\n' |
| 4681 | + ' val = 3\n' |
| 4682 | + ' print(f"{val} * 2 is {double(val)}")\n' |
| 4683 | + '\n' |
| 4684 | + 'The debugger’s prompt is "(Pdb)", which is the indicator that ' |
| 4685 | + 'you are\n' |
| 4686 | + 'in debug mode:\n' |
| 4687 | + '\n' |
| 4688 | + ' > ...(3)double()\n' |
| 4689 | + ' -> return x * 2\n' |
| 4690 | + ' (Pdb) p x\n' |
| 4691 | + ' 3\n' |
4664 | 4692 | ' (Pdb) continue\n' |
4665 | | - " NameError: 'spam'\n" |
4666 | | - ' > <string>(1)?()\n' |
4667 | | - ' (Pdb)\n' |
| 4693 | + ' 3 * 2 is 6\n' |
4668 | 4694 | '\n' |
4669 | 4695 | 'Changed in version 3.3: Tab-completion via the "readline" module ' |
4670 | 4696 | 'is\n' |
4671 | 4697 | 'available for commands and command arguments, e.g. the current ' |
4672 | 4698 | 'global\n' |
4673 | 4699 | 'and local names are offered as arguments of the "p" command.\n' |
4674 | 4700 | '\n' |
4675 | | - '"pdb.py" can also be invoked as a script to debug other ' |
4676 | | - 'scripts. For\n' |
4677 | | - 'example:\n' |
| 4701 | + 'You can also invoke "pdb" from the command line to debug other\n' |
| 4702 | + 'scripts. For example:\n' |
4678 | 4703 | '\n' |
4679 | 4704 | ' python -m pdb myscript.py\n' |
4680 | 4705 | '\n' |
4681 | | - 'When invoked as a script, pdb will automatically enter ' |
| 4706 | + 'When invoked as a module, pdb will automatically enter ' |
4682 | 4707 | 'post-mortem\n' |
4683 | 4708 | 'debugging if the program being debugged exits abnormally. After ' |
4684 | 4709 | 'post-\n' |
|
4690 | 4715 | 'the\n' |
4691 | 4716 | 'debugger upon program’s exit.\n' |
4692 | 4717 | '\n' |
4693 | | - 'New in version 3.2: "pdb.py" now accepts a "-c" option that ' |
4694 | | - 'executes\n' |
4695 | | - 'commands as if given in a ".pdbrc" file, see Debugger Commands.\n' |
4696 | | - '\n' |
4697 | | - 'New in version 3.7: "pdb.py" now accepts a "-m" option that ' |
4698 | | - 'execute\n' |
4699 | | - 'modules similar to the way "python -m" does. As with a script, ' |
4700 | | - 'the\n' |
4701 | | - 'debugger will pause execution just before the first line of the\n' |
4702 | | - 'module.\n' |
| 4718 | + 'New in version 3.2: "-c" option is introduced to execute ' |
| 4719 | + 'commands as\n' |
| 4720 | + 'if given in a ".pdbrc" file, see Debugger Commands.\n' |
4703 | 4721 | '\n' |
4704 | | - 'The typical usage to break into the debugger is to insert:\n' |
| 4722 | + 'New in version 3.7: "-m" option is introduced to execute ' |
| 4723 | + 'modules\n' |
| 4724 | + 'similar to the way "python -m" does. As with a script, the ' |
| 4725 | + 'debugger\n' |
| 4726 | + 'will pause execution just before the first line of the module.\n' |
4705 | 4727 | '\n' |
4706 | | - ' import pdb; pdb.set_trace()\n' |
| 4728 | + 'Typical usage to execute a statement under control of the ' |
| 4729 | + 'debugger is:\n' |
4707 | 4730 | '\n' |
4708 | | - 'at the location you want to break into the debugger, and then ' |
4709 | | - 'run the\n' |
4710 | | - 'program. You can then step through the code following this ' |
4711 | | - 'statement,\n' |
4712 | | - 'and continue running without the debugger using the "continue"\n' |
4713 | | - 'command.\n' |
4714 | | - '\n' |
4715 | | - 'New in version 3.7: The built-in "breakpoint()", when called ' |
4716 | | - 'with\n' |
4717 | | - 'defaults, can be used instead of "import pdb; pdb.set_trace()".\n' |
| 4731 | + ' >>> import pdb\n' |
| 4732 | + ' >>> def f(x):\n' |
| 4733 | + ' ... print(1 / x)\n' |
| 4734 | + ' >>> pdb.run("f(2)")\n' |
| 4735 | + ' > <string>(1)<module>()\n' |
| 4736 | + ' (Pdb) continue\n' |
| 4737 | + ' 0.5\n' |
| 4738 | + ' >>>\n' |
4718 | 4739 | '\n' |
4719 | 4740 | 'The typical usage to inspect a crashed program is:\n' |
4720 | 4741 | '\n' |
4721 | 4742 | ' >>> import pdb\n' |
4722 | | - ' >>> import mymodule\n' |
4723 | | - ' >>> mymodule.test()\n' |
| 4743 | + ' >>> def f(x):\n' |
| 4744 | + ' ... print(1 / x)\n' |
| 4745 | + ' ...\n' |
| 4746 | + ' >>> f(0)\n' |
4724 | 4747 | ' Traceback (most recent call last):\n' |
4725 | 4748 | ' File "<stdin>", line 1, in <module>\n' |
4726 | | - ' File "./mymodule.py", line 4, in test\n' |
4727 | | - ' test2()\n' |
4728 | | - ' File "./mymodule.py", line 3, in test2\n' |
4729 | | - ' print(spam)\n' |
4730 | | - ' NameError: spam\n' |
| 4749 | + ' File "<stdin>", line 2, in f\n' |
| 4750 | + ' ZeroDivisionError: division by zero\n' |
4731 | 4751 | ' >>> pdb.pm()\n' |
4732 | | - ' > ./mymodule.py(3)test2()\n' |
4733 | | - ' -> print(spam)\n' |
| 4752 | + ' > <stdin>(2)f()\n' |
| 4753 | + ' (Pdb) p x\n' |
| 4754 | + ' 0\n' |
4734 | 4755 | ' (Pdb)\n' |
4735 | 4756 | '\n' |
4736 | 4757 | 'The module defines the following functions; each enters the ' |
|
4949 | 4970 | '\n' |
4950 | 4971 | ' Print a stack trace, with the most recent frame at the ' |
4951 | 4972 | 'bottom. An\n' |
4952 | | - ' arrow indicates the current frame, which determines the ' |
4953 | | - 'context of\n' |
4954 | | - ' most commands.\n' |
| 4973 | + ' arrow (">") indicates the current frame, which determines ' |
| 4974 | + 'the\n' |
| 4975 | + ' context of most commands.\n' |
4955 | 4976 | '\n' |
4956 | 4977 | 'd(own) [count]\n' |
4957 | 4978 | '\n' |
|
5179 | 5200 | '\n' |
5180 | 5201 | 'a(rgs)\n' |
5181 | 5202 | '\n' |
5182 | | - ' Print the argument list of the current function.\n' |
| 5203 | + ' Print the arguments of the current function and their ' |
| 5204 | + 'current\n' |
| 5205 | + ' values.\n' |
5183 | 5206 | '\n' |
5184 | 5207 | 'p expression\n' |
5185 | 5208 | '\n' |
|
5217 | 5240 | 'current\n' |
5218 | 5241 | ' frame.\n' |
5219 | 5242 | '\n' |
| 5243 | + ' Note:\n' |
| 5244 | + '\n' |
| 5245 | + ' Display evaluates *expression* and compares to the result ' |
| 5246 | + 'of the\n' |
| 5247 | + ' previous evaluation of *expression*, so when the result is\n' |
| 5248 | + ' mutable, display may not be able to pick up the changes.\n' |
| 5249 | + '\n' |
| 5250 | + ' Example:\n' |
| 5251 | + '\n' |
| 5252 | + ' lst = []\n' |
| 5253 | + ' breakpoint()\n' |
| 5254 | + ' pass\n' |
| 5255 | + ' lst.append(1)\n' |
| 5256 | + ' print(lst)\n' |
| 5257 | + '\n' |
| 5258 | + ' Display won’t realize "lst" has been changed because the ' |
| 5259 | + 'result of\n' |
| 5260 | + ' evaluation is modified in place by "lst.append(1)" before ' |
| 5261 | + 'being\n' |
| 5262 | + ' compared:\n' |
| 5263 | + '\n' |
| 5264 | + ' > example.py(3)<module>()\n' |
| 5265 | + ' -> pass\n' |
| 5266 | + ' (Pdb) display lst\n' |
| 5267 | + ' display lst: []\n' |
| 5268 | + ' (Pdb) n\n' |
| 5269 | + ' > example.py(4)<module>()\n' |
| 5270 | + ' -> lst.append(1)\n' |
| 5271 | + ' (Pdb) n\n' |
| 5272 | + ' > example.py(5)<module>()\n' |
| 5273 | + ' -> print(lst)\n' |
| 5274 | + ' (Pdb)\n' |
| 5275 | + '\n' |
| 5276 | + ' You can do some tricks with copy mechanism to make it work:\n' |
| 5277 | + '\n' |
| 5278 | + ' > example.py(3)<module>()\n' |
| 5279 | + ' -> pass\n' |
| 5280 | + ' (Pdb) display lst[:]\n' |
| 5281 | + ' display lst[:]: []\n' |
| 5282 | + ' (Pdb) n\n' |
| 5283 | + ' > example.py(4)<module>()\n' |
| 5284 | + ' -> lst.append(1)\n' |
| 5285 | + ' (Pdb) n\n' |
| 5286 | + ' > example.py(5)<module>()\n' |
| 5287 | + ' -> print(lst)\n' |
| 5288 | + ' display lst[:]: [1] [old: []]\n' |
| 5289 | + ' (Pdb)\n' |
| 5290 | + '\n' |
5220 | 5291 | ' New in version 3.2.\n' |
5221 | 5292 | '\n' |
5222 | 5293 | 'undisplay [expression]\n' |
|
5318 | 5389 | '\n' |
5319 | 5390 | 'retval\n' |
5320 | 5391 | '\n' |
5321 | | - ' Print the return value for the last return of a function.\n' |
| 5392 | + ' Print the return value for the last return of the current ' |
| 5393 | + 'function.\n' |
5322 | 5394 | '\n' |
5323 | 5395 | '-[ Footnotes ]-\n' |
5324 | 5396 | '\n' |
|
9506 | 9578 | ' by carefully chosen inputs that exploit the worst case\n' |
9507 | 9579 | ' performance of a dict insertion, O(n^2) complexity. ' |
9508 | 9580 | 'See\n' |
9509 | | - ' http://www.ocert.org/advisories/ocert-2011-003.html ' |
9510 | | - 'for\n' |
| 9581 | + ' http://ocert.org/advisories/ocert-2011-003.html for\n' |
9511 | 9582 | ' details.Changing hash values affects the iteration ' |
9512 | 9583 | 'order of sets.\n' |
9513 | 9584 | ' Python has never made guarantees about this ordering ' |
@@ -10161,20 +10232,32 @@ |
10161 | 10232 | 'Resolving MRO entries\n' |
10162 | 10233 | '---------------------\n' |
10163 | 10234 | '\n' |
10164 | | - 'If a base that appears in class definition is not an ' |
| 10235 | + 'object.__mro_entries__(self, bases)\n' |
| 10236 | + '\n' |
| 10237 | + ' If a base that appears in a class definition is not an ' |
10165 | 10238 | 'instance of\n' |
10166 | | - '"type", then an "__mro_entries__" method is searched on it. ' |
10167 | | - 'If found,\n' |
10168 | | - 'it is called with the original bases tuple. This method must ' |
10169 | | - 'return a\n' |
10170 | | - 'tuple of classes that will be used instead of this base. The ' |
10171 | | - 'tuple may\n' |
10172 | | - 'be empty, in such case the original base is ignored.\n' |
| 10239 | + ' "type", then an "__mro_entries__()" method is searched on ' |
| 10240 | + 'the base.\n' |
| 10241 | + ' If an "__mro_entries__()" method is found, the base is ' |
| 10242 | + 'substituted\n' |
| 10243 | + ' with the result of a call to "__mro_entries__()" when ' |
| 10244 | + 'creating the\n' |
| 10245 | + ' class. The method is called with the original bases tuple ' |
| 10246 | + 'passed to\n' |
| 10247 | + ' the *bases* parameter, and must return a tuple of classes ' |
| 10248 | + 'that will\n' |
| 10249 | + ' be used instead of the base. The returned tuple may be ' |
| 10250 | + 'empty: in\n' |
| 10251 | + ' these cases, the original base is ignored.\n' |
10173 | 10252 | '\n' |
10174 | 10253 | 'See also:\n' |
10175 | 10254 | '\n' |
10176 | | - ' **PEP 560** - Core support for typing module and generic ' |
10177 | | - 'types\n' |
| 10255 | + ' "types.resolve_bases()"\n' |
| 10256 | + ' Dynamically resolve bases that are not instances of ' |
| 10257 | + '"type".\n' |
| 10258 | + '\n' |
| 10259 | + ' **PEP 560**\n' |
| 10260 | + ' Core support for typing module and generic types.\n' |
10178 | 10261 | '\n' |
10179 | 10262 | '\n' |
10180 | 10263 | 'Determining the appropriate metaclass\n' |
|
11830 | 11913 | 'followed by\n' |
11831 | 11914 | ' the string itself.\n' |
11832 | 11915 | '\n' |
11833 | | - 'str.rsplit(sep=None, maxsplit=-1)\n' |
| 11916 | + 'str.rsplit(sep=None, maxsplit=- 1)\n' |
11834 | 11917 | '\n' |
11835 | 11918 | ' Return a list of the words in the string, using *sep* ' |
11836 | 11919 | 'as the\n' |
|
11871 | 11954 | " >>> 'Monty Python'.removesuffix(' Python')\n" |
11872 | 11955 | " 'Monty'\n" |
11873 | 11956 | '\n' |
11874 | | - 'str.split(sep=None, maxsplit=-1)\n' |
| 11957 | + 'str.split(sep=None, maxsplit=- 1)\n' |
11875 | 11958 | '\n' |
11876 | 11959 | ' Return a list of the words in the string, using *sep* ' |
11877 | 11960 | 'as the\n' |
|
12696 | 12779 | 'with\n' |
12697 | 12780 | 'all exceptions that were raised from within "except*" clauses.\n' |
12698 | 12781 | '\n' |
| 12782 | + 'From version 3.11.4, when the entire "ExceptionGroup" is handled and\n' |
| 12783 | + 'only one exception is raised from an "except*" clause, this ' |
| 12784 | + 'exception\n' |
| 12785 | + 'is no longer wrapped to form a new "ExceptionGroup".\n' |
| 12786 | + '\n' |
12699 | 12787 | 'If the raised exception is not an exception group and its type ' |
12700 | 12788 | 'matches\n' |
12701 | 12789 | 'one of the "except*" clauses, it is caught and wrapped by an ' |
|
0 commit comments