8000 GH-121970: Extract `pydoc_topics` into a new extension by AA-Turner · Pull Request #131256 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-121970 8000 : Extract pydoc_topics into a new extension #131256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Regenerate pydoc_data/topics.py
  • Loading branch information
AA-Turner committed Mar 14, 2025
commit c6fb2e99bf989cd48308d3cae7855d092dc8aad8
89 changes: 63 additions & 26 deletions Lib/pydoc_data/topics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Autogenerated by Sphinx on Tue Feb 11 19:16:18 2025
# Autogenerated by Sphinx on Fri Mar 14 15:32:05 2025
# as part of the release process.

topics = {
Expand Down Expand Up @@ -3829,7 +3829,7 @@ def double(x):
You can also invoke "pdb" from the command line to debug other
scripts. For example:

python -m pdb myscript.py
python -m pdb [-c command] (-m module | pyfile) [args ...]

When invoked as a module, pdb will automatically enter post-mortem
debugging if the program being debugged exits abnormally. After post-
Expand All @@ -3838,12 +3838,20 @@ def double(x):
as breakpoints) and in most cases is more useful than quitting the
debugger upon program’s exit.

Changed in version 3.2: Added the "-c" option to execute commands as
if given in a ".pdbrc" file; see Debugger Commands.
-c, --command <command>

Changed in version 3.7: Added the "-m" option to execute modules
similar to the way "python -m" does. As with a script, the debugger
will pause execution just before the first line of the module.
To execute commands as if given in a ".pdbrc" file; see Debugger
Commands.

Changed in version 3.2: Added the "-c" option.

-m <module>

To execute modules similar to the way "python -m" does. As with a
script, the debugger will pause execution just before the first
line of the module.

Changed in version 3.7: Added the "-m" option.

Typical usage to execute a statement under control of the debugger is:

Expand Down Expand Up @@ -3950,9 +3958,9 @@ class pdb.Pdb(completekey='tab', stdin=None, stdout=None, skip=None, nosigint=Fa
originate in a module that matches one of these patterns. [1]

By default, Pdb sets a handler for the SIGINT signal (which is sent
when the user presses "Ctrl-C" on the console) when you give a
when the user presses "Ctrl"-"C" on the console) when you give a
"continue" command. This allows you to break into the debugger
again by pressing "Ctrl-C". If you want Pdb not to touch the
again by pressing "Ctrl"-"C". If you want Pdb not to touch the
SIGINT handler, set *nosigint* to true.

The *readrc* argument defaults to true and controls whether Pdb
Expand All @@ -3979,6 +3987,10 @@ class pdb.Pdb(completekey='tab', stdin=None, stdout=None, skip=None, nosigint=Fa

Added in version 3.14: Added the *mode* argument.

Changed in version 3.14: Inline breakpoints like "breakpoint()" or
"pdb.set_trace()" will always stop the program at calling frame,
ignoring the *skip* pattern (if any).

run(statement, globals=None, locals=None)
runeval(expression, globals=None, locals=None)
runcall(function, *args, **kwds)
Expand Down Expand Up @@ -5232,14 +5244,19 @@ class of the instance or a *non-virtual base class* thereof. The

The general form of a *standard format specifier* is:

**format_spec**: [["fill"]"align"]["sign"]["z"]["#"]["0"]["width"]["grouping_option"]["." "precision"]["type"]
**fill**: <any character>
**align**: "<" | ">" | "=" | "^"
**sign**: "+" | "-" | " "
**width**: "digit"+
**grouping_option**: "_" | ","
**precision**: "digit"+
**type**: "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"
**format_spec**: ["options"]["width_and_precision"]["type"]
**options**: [["fill"]"align"]["sign"]["z"]["#"]["0"]
**fill**: <any character>
**align**: "<" | ">" | "=" | "^"
**sign**: "+" | "-" | " "
**width_and_precision**: ["width_with_grouping"]["precision_with_grouping"]
**width_with_grouping**: ["width"]["grouping_option"]
**precision_with_grouping**: "." ["precision"]"grouping_option"
**width**: "digit"+
**grouping_option**: "_" | ","
**precision**: "digit"+
**type**: "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g"
| "G" | "n" | "o" | "s" | "x" | "X" | "%"

If a valid *align* value is specified, it can be preceded by a *fill*
character that can be any character and defaults to a space if
Expand Down Expand Up @@ -5347,6 +5364,13 @@ class of the instance or a *non-virtual base class* thereof. The
from the field content. The *precision* is not allowed for integer
presentation types.

The "'_'" or "','" option after *precision* means the use of an
underscore or a comma for a thousands separator of the fractional part
for floating-point presentation types.

Changed in version 3.14: Support thousands separators for the
fractional part.

Finally, the *type* determines how the data should be presented.

The available string presentation types are:
Expand Down Expand Up @@ -5579,10 +5603,18 @@ class of the instance or a *non-virtual base class* thereof. The
>>> "int: {0:d}; hex: {0:#x}; oct: {0:#o}; bin: {0:#b}".format(42)
'int: 42; hex: 0x2a; oct: 0o52; bin: 0b101010'

Using the comma as a thousands separator:
Using the comma or the underscore as a thousands separator:

>>> '{:,}'.format(1234567890)
'1,234,567,890'
>>> '{:_}'.format(1234567890)
'1_234_567_890'
>>> '{:_}'.format(123456789.123456789)
'123_456_789.12345679'
>>> '{:._}'.format(123456789.123456789)
'123456789.123_456_79'
>>> '{:_._}'.format(123456789.123456789)
'123_456_789.123_456_79'

Expressing a percentage:

Expand Down Expand Up @@ -9316,14 +9348,19 @@ class is used in a class pattern with positional arguments, each

str.isprintable()

Return "True" if all characters in the string are printable or the
string is empty, "False" otherwise. Nonprintable characters are
those characters defined in the Unicode character database as
“Other” or “Separator”, excepting the ASCII space (0x20) which is
considered printable. (Note that printable characters in this
context are those which should not be escaped when "repr()" is
invoked on a string. It has no bearing on the handling of strings
written to "sys.stdout" or "sys.stderr".)
Return true if all characters in the string are printable, false if
it contains at least one non-printable character.

Here “printable” means the character is suitable for "repr()" to
use in its output; “non-printable” means that "repr()" on built-in
types will hex-escape the character. It has no bearing on the
handling of strings written to "sys.stdout" or "sys.stderr".

The printable characters are those which in the Unicode character
database (see "unicodedata") have a general category in group
Letter, Mark, Number, Punctuation, or Symbol (L, M, N, P, or S);
plus the ASCII space 0x20. Nonprintable characters are those in
group Separator or Other (Z or C), except the ASCII space.

str.isspace()

Expand Down
Loading
0