1- # Autogenerated by Sphinx on Sat Feb 22 02:02:02 2025
1+ # Autogenerated by Sphinx on Tue Apr 8 13:35:42 2025
22# as part of the release process.
33
44topics = {
@@ -2660,7 +2660,7 @@ class attributes; they are shared by instances. Instance attributes
26602660 parameter_list_no_posonly ::= defparameter ("," defparameter)* ["," [parameter_list_starargs]]
26612661 | parameter_list_starargs
26622662 parameter_list_starargs ::= "*" [star_parameter] ("," defparameter)* ["," [parameter_star_kwargs]]
2663- "*" ("," defparameter)+ ["," [parameter_star_kwargs]]
2663+ | "*" ("," defparameter)+ ["," [parameter_star_kwargs]]
26642664 | parameter_star_kwargs
26652665 parameter_star_kwargs ::= "**" parameter [","]
26662666 parameter ::= identifier [":" expression]
@@ -3743,7 +3743,7 @@ def double(x):
37433743You can also invoke "pdb" from the command line to debug other
37443744scripts. For example:
37453745
3746- python -m pdb myscript.py
3746+ python -m pdb [-c command] (-m module | pyfile) [args ...]
37473747
37483748When invoked as a module, pdb will automatically enter post-mortem
37493749debugging if the program being debugged exits abnormally. After post-
@@ -3752,12 +3752,20 @@ def double(x):
37523752as breakpoints) and in most cases is more useful than quitting the
37533753debugger upon program’s exit.
37543754
3755- Changed in version 3.2: Added the "-c" option to execute commands as
3756- if given in a ".pdbrc" file; see Debugger Commands.
3755+ -c, --command <command>
37573756
3758- Changed in version 3.7: Added the "-m" option to execute modules
3759- similar to the way "python -m" does. As with a script, the debugger
3760- will pause execution just before the first line of the module.
3757+ To execute commands as if given in a ".pdbrc" file; see Debugger
3758+ Commands.
3759+
3760+ Changed in version 3.2: Added the "-c" option.
3761+
3762+ -m <module>
3763+
3764+ To execute modules similar to the way "python -m" does. As with a
3765+ script, the debugger will pause execution just before the first
3766+ line of the module.
3767+
3768+ Changed in version 3.7: Added the "-m" option.
37613769
37623770Typical usage to execute a statement under control of the debugger is:
37633771
@@ -5026,14 +5034,16 @@ class of the instance or a *non-virtual base class* thereof. The
50265034
50275035The general form of a *standard format specifier* is:
50285036
5029- format_spec ::= [[fill]align][sign]["z"]["#"]["0"][width][grouping_option]["." precision][type]
5030- fill ::= <any character>
5031- align ::= "<" | ">" | "=" | "^"
5032- sign ::= "+" | "-" | " "
5033- width ::= digit+
5034- grouping_option ::= "_" | ","
5035- precision ::= digit+
5036- type ::= "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"
5037+ format_spec ::= [options][width][grouping]["." precision][type]
5038+ options ::= [[fill]align][sign]["z"]["#"]["0"]
5039+ fill ::= <any character>
5040+ align ::= "<" | ">" | "=" | "^"
5041+ sign ::= "+" | "-" | " "
5042+ width ::= digit+
5043+ grouping ::= "," | "_"
5044+ precision ::= digit+
5045+ type ::= "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g"
5046+ | "G" | "n" | "o" | "s" | "x" | "X" | "%"
50375047
50385048If a valid *align* value is specified, it can be preceded by a *fill*
50395049character that can be any character and defaults to a space if
@@ -5075,13 +5085,13 @@ class of the instance or a *non-virtual base class* thereof. The
50755085+-----------+------------------------------------------------------------+
50765086| Option | Meaning |
50775087|===========|============================================================|
5078- | "'+'" | indicates that a sign should be used for both positive as |
5088+ | "'+'" | Indicates that a sign should be used for both positive as |
50795089| | well as negative numbers. |
50805090+-----------+------------------------------------------------------------+
5081- | "'-'" | indicates that a sign should be used only for negative |
5091+ | "'-'" | Indicates that a sign should be used only for negative |
50825092| | numbers (this is the default behavior). |
50835093+-----------+------------------------------------------------------------+
5084- | space | indicates that a leading space should be used on positive |
5094+ | space | Indicates that a leading space should be used on positive |
50855095| | numbers, and a minus sign on negative numbers. |
50865096+-----------+------------------------------------------------------------+
50875097
@@ -5104,26 +5114,10 @@ class of the instance or a *non-virtual base class* thereof. The
51045114digit follows it. In addition, for "'g'" and "'G'" conversions,
51055115trailing zeros are not removed from the result.
51065116
5107- The "','" option signals the use of a comma for a thousands separator
5108- for floating-point presentation types and for integer presentation
5109- type "'d'". For other presentation types, this option is an error. For
5110- a locale aware separator, use the "'n'" integer presentation type
5111- instead.
5112-
5113- Changed in version 3.1: Added the "','" option (see also **PEP 378**).
5114-
5115- The "'_'" option signals the use of an underscore for a thousands
5116- separator for floating-point presentation types and for integer
5117- presentation type "'d'". For integer presentation types "'b'", "'o'",
5118- "'x'", and "'X'", underscores will be inserted every 4 digits. For
5119- other presentation types, specifying this option is an error.
5120-
5121- Changed in version 3.6: Added the "'_'" option (see also **PEP 515**).
5122-
5123- *width* is a decimal integer defining the minimum total field width,
5124- including any prefixes, separators, and other formatting characters.
5125- If not specified, then the field width will be determined by the
5126- content.
5117+ The *width* is a decimal integer defining the minimum total field
5118+ width, including any prefixes, separators, and other formatting
5119+ characters. If not specified, then the field width will be determined
5120+ by the content.
51275121
51285122When no explicit alignment is given, preceding the *width* field by a
51295123zero ("'0'") character enables sign-aware zero-padding for numeric
@@ -5133,6 +5127,32 @@ class of the instance or a *non-virtual base class* thereof. The
51335127Changed in version 3.10: Preceding the *width* field by "'0'" no
51345128longer affects the default alignment for strings.
51355129
5130+ The *grouping* option after the *width* field specifies a digit group
5131+ separator for the integral part of a number. It can be one of the
5132+ following:
5133+
5134+ +-----------+------------------------------------------------------------+
5135+ | Option | Meaning |
5136+ |===========|============================================================|
5137+ | "','" | Inserts a comma every 3 digits for integer presentation |
5138+ | | type "'d'" and floating-point presentation types, |
5139+ | | excluding "'n'". For other presentation types, this option |
5140+ | | is not supported. |
5141+ +-----------+------------------------------------------------------------+
5142+ | "'_'" | Inserts an underscore every 3 digits for integer |
5143+ | | presentation type "'d'" and floating-point presentation |
5144+ | | types, excluding "'n'". For integer presentation types |
5145+ | | "'b'", "'o'", "'x'", and "'X'", underscores are inserted |
5146+ | | every 4 digits. For other presentation types, this option |
5147+ | | is not supported. |
5148+ +-----------+------------------------------------------------------------+
5149+
5150+ For a locale aware separator, use the "'n'" presentation type instead.
5151+
5152+ Changed in version 3.1: Added the "','" option (see also **PEP 378**).
5153+
5154+ Changed in version 3.6: Added the "'_'" option (see also **PEP 515**).
5155+
51365156The *precision* is a decimal integer indicating how many digits should
51375157be displayed after the decimal point for presentation types "'f'" and
51385158"'F'", or before and after the decimal point for presentation types
@@ -5177,8 +5197,8 @@ class of the instance or a *non-virtual base class* thereof. The
51775197 | | as well. |
51785198 +-----------+------------------------------------------------------------+
51795199 | "'n'" | Number. This is the same as "'d'", except that it uses the |
5180- | | current locale setting to insert the appropriate number |
5181- | | separator characters. |
5200+ | | current locale setting to insert the appropriate digit |
5201+ | | group separators. |
51825202 +-----------+------------------------------------------------------------+
51835203 | None | The same as "'d'". |
51845204 +-----------+------------------------------------------------------------+
@@ -5249,8 +5269,8 @@ class of the instance or a *non-virtual base class* thereof. The
52495269 | | and NaN are uppercased, too. |
52505270 +-----------+------------------------------------------------------------+
52515271 | "'n'" | Number. This is the same as "'g'", except that it uses the |
5252- | | current locale setting to insert the appropriate number |
5253- | | separator characters. |
5272+ | | current locale setting to insert the appropriate digit |
5273+ | | group separators for the integral part of a number. |
52545274 +-----------+------------------------------------------------------------+
52555275 | "'%'" | Percentage. Multiplies the number by 100 and displays in |
52565276 | | fixed ("'f'") format, followed by a percent sign. |
@@ -5373,10 +5393,16 @@ class of the instance or a *non-virtual base class* thereof. The
53735393 >>> "int: {0:d}; hex: {0:#x}; oct: {0:#o}; bin: {0:#b}".format(42)
53745394 'int: 42; hex: 0x2a; oct: 0o52; bin: 0b101010'
53755395
5376- Using the comma as a thousands separator:
5396+ Using the comma or the underscore as a digit group separator:
53775397
53785398 >>> '{:,}'.format(1234567890)
53795399 '1,234,567,890'
5400+ >>> '{:_}'.format(1234567890)
5401+ '1_234_567_890'
5402+ >>> '{:_b}'.format(1234567890)
5403+ '100_1001_1001_0110_0000_0010_1101_0010'
5404+ >>> '{:_x}'.format(1234567890)
5405+ '4996_02d2'
53805406
53815407Expressing a percentage:
53825408
@@ -5436,7 +5462,7 @@ class of the instance or a *non-virtual base class* thereof. The
54365462 parameter_list_no_posonly ::= defparameter ("," defparameter)* ["," [parameter_list_starargs]]
54375463 | parameter_list_starargs
54385464 parameter_list_starargs ::= "*" [star_parameter] ("," defparameter)* ["," [parameter_star_kwargs]]
5439- "*" ("," defparameter)+ ["," [parameter_star_kwargs]]
5465+ | "*" ("," defparameter)+ ["," [parameter_star_kwargs]]
54405466 | parameter_star_kwargs
54415467 parameter_star_kwargs ::= "**" parameter [","]
54425468 parameter ::= identifier [":" expression]
@@ -11397,7 +11423,7 @@ class dict(iterable, **kwargs)
1139711423 to be a mutable object such as an empty list. To get distinct
1139811424 values, use a dict comprehension instead.
1139911425
11400- get(key, default=None)
11426+ get(key, default=None, / )
1140111427
1140211428 Return the value for *key* if *key* is in the dictionary, else
1140311429 *default*. If *default* is not given, it defaults to "None", so
@@ -11438,7 +11464,7 @@ class dict(iterable, **kwargs)
1143811464
1143911465 Added in version 3.8.
1144011466
11441- setdefault(key, default=None)
11467+ setdefault(key, default=None, / )
1144211468
1144311469 If *key* is in the dictionary, return its value. If not, insert
1144411470 *key* with a value of *default* and return *default*. *default*
0 commit comments