1- # Autogenerated by Sphinx on Tue Apr 8 15:54:03 2025
1+ # Autogenerated by Sphinx on Tue Jun 3 17:34:20 2025
22# as part of the release process.
33
44topics = {
@@ -4385,7 +4385,7 @@ class pdb.Pdb(completekey='tab', stdin=None, stdout=None, skip=None, nosigint=Fa
43854385 When using "pdb.pm()" or "Pdb.post_mortem(...)" with a chained
43864386 exception instead of a traceback, it allows the user to move
43874387 between the chained exceptions using "exceptions" command to list
4388- exceptions, and "exception <number>" to switch to that exception.
4388+ exceptions, and "exceptions <number>" to switch to that exception.
43894389
43904390 Example:
43914391
@@ -9011,7 +9011,14 @@ class is used in a class pattern with positional arguments, each
90119011 Return centered in a string of length *width*. Padding is done
90129012 using the specified *fillchar* (default is an ASCII space). The
90139013 original string is returned if *width* is less than or equal to
9014- "len(s)".
9014+ "len(s)". For example:
9015+
9016+ >>> 'Python'.center(10)
9017+ ' Python '
9018+ >>> 'Python'.center(10, '-')
9019+ '--Python--'
9020+ >>> 'Python'.center(4)
9021+ 'Python'
90159022
90169023str.count(sub[, start[, end]])
90179024
@@ -9020,7 +9027,18 @@ class is used in a class pattern with positional arguments, each
90209027 *end* are interpreted as in slice notation.
90219028
90229029 If *sub* is empty, returns the number of empty strings between
9023- characters which is the length of the string plus one.
9030+ characters which is the length of the string plus one. For example:
9031+
9032+ >>> 'spam, spam, spam'.count('spam')
9033+ 3
9034+ >>> 'spam, spam, spam'.count('spam', 5)
9035+ 2
9036+ >>> 'spam, spam, spam'.count('spam', 5, 10)
9037+ 1
9038+ >>> 'spam, spam, spam'.count('eggs')
9039+ 0
9040+ >>> 'spam, spam, spam'.count('')
9041+ 17
90249042
90259043str.encode(encoding='utf-8', errors='strict')
90269044
@@ -9217,8 +9235,8 @@ class is used in a class pattern with positional arguments, each
92179235
92189236str.isprintable()
92199237
9220- Return true if all characters in the string are printable, false if
9221- it contains at least one non-printable character.
9238+ Return "True" if all characters in the string are printable,
9239+ "False" if it contains at least one non-printable character.
92229240
92239241 Here “printable” means the character is suitable for "repr()" to
92249242 use in its output; “non-printable” means that "repr()" on built-in
@@ -9465,6 +9483,18 @@ class is used in a class pattern with positional arguments, each
94659483 >>> ' 1 2 3 '.split()
94669484 ['1', '2', '3']
94679485
9486+ If *sep* is not specified or is "None" and *maxsplit* is "0", only
9487+ leading runs of consecutive whitespace are considered.
9488+
9489+ For example:
9490+
9491+ >>> "".split(None, 0)
9492+ []
9493+ >>> " ".split(None, 0)
9494+ []
9495+ >>> " foo ".split(maxsplit=0)
9496+ ['foo ']
9497+
94689498str.splitlines(keepends=False)
94699499
94709500 Return a list of the lines in the string, breaking at line
@@ -11144,11 +11174,10 @@ class instance has a namespace implemented as a dictionary which is
1114411174Flags for details on the semantics of each flags that might be
1114511175present.
1114611176
11147- Future feature declarations ("from __future__ import division") also
11148- use bits in "co_flags" to indicate whether a code object was compiled
11149- with a particular feature enabled: bit "0x2000" is set if the function
11150- was compiled with future division enabled; bits "0x10" and "0x1000"
11151- were used in earlier versions of Python.
11177+ Future feature declarations (for example, "from __future__ import
11178+ division") also use bits in "co_flags" to indicate whether a code
11179+ object was compiled with a particular feature enabled. See
11180+ "compiler_flag".
1115211181
1115311182Other bits in "co_flags" are reserved for internal use.
1115411183
@@ -11496,8 +11525,15 @@ class dict(iterable, **kwargs)
1149611525 the keyword argument replaces the value from the positional
1149711526 argument.
1149811527
11499- To illustrate, the following examples all return a dictionary equal
11500- to "{"one": 1, "two": 2, "three": 3}":
11528+ Providing keyword arguments as in the first example only works for
11529+ keys that are valid Python identifiers. Otherwise, any valid keys
11530+ can be used.
11531+
11532+ Dictionaries compare equal if and only if they have the same "(key,
11533+ value)" pairs (regardless of ordering). Order comparisons (‘<’,
11534+ ‘<=’, ‘>=’, ‘>’) raise "TypeError". To illustrate dictionary
11535+ creation and equality, the following examples all return a
11536+ dictionary equal to "{"one": 1, "two": 2, "three": 3}":
1150111537
1150211538 >>> a = dict(one=1, two=2, three=3)
1150311539 >>> b = {'one': 1, 'two': 2, 'three': 3}
@@ -11512,6 +11548,29 @@ class dict(iterable, **kwargs)
1151211548 keys that are valid Python identifiers. Otherwise, any valid keys
1151311549 can be used.
1151411550
11551+ Dictionaries preserve insertion order. Note that updating a key
11552+ does not affect the order. Keys added after deletion are inserted
11553+ at the end.
11554+
11555+ >>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
11556+ >>> d
11557+ {'one': 1, 'two': 2, 'three': 3, 'four': 4}
11558+ >>> list(d)
11559+ ['one', 'two', 'three', 'four']
11560+ >>> list(d.values())
11561+ [1, 2, 3, 4]
11562+ >>> d["one"] = 42
11563+ >>> d
11564+ {'one': 42, 'two': 2, 'three': 3, 'four': 4}
11565+ >>> del d["two"]
11566+ >>> d["two"] = None
11567+ >>> d
11568+ {'one': 42, 'three': 3, 'four': 4, 'two': None}
11569+
11570+ Changed in version 3.7: Dictionary order is guaranteed to be
11571+ insertion order. This behavior was an implementation detail of
11572+ CPython from 3.6.
11573+
1151511574 These are the operations that dictionaries support (and therefore,
1151611575 custom mapping types should support too):
1151711576
@@ -11682,33 +11741,6 @@ class dict(iterable, **kwargs)
1168211741
1168311742 Added in version 3.9.
1168411743
11685- Dictionaries compare equal if and only if they have the same "(key,
11686- value)" pairs (regardless of ordering). Order comparisons (‘<’,
11687- ‘<=’, ‘>=’, ‘>’) raise "TypeError".
11688-
11689- Dictionaries preserve insertion order. Note that updating a key
11690- does not affect the order. Keys added after deletion are inserted
11691- at the end.
11692-
11693- >>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
11694- >>> d
11695- {'one': 1, 'two': 2, 'three': 3, 'four': 4}
11696- >>> list(d)
11697- ['one', 'two', 'three', 'four']
11698- >>> list(d.values())
11699- [1, 2, 3, 4]
11700- >>> d["one"] = 42
11701- >>> d
11702- {'one': 42, 'two': 2, 'three': 3, 'four': 4}
11703- >>> del d["two"]
11704- >>> d["two"] = None
11705- >>> d
11706- {'one': 42, 'three': 3, 'four': 4, 'two': None}
11707-
11708- Changed in version 3.7: Dictionary order is guaranteed to be
11709- insertion order. This behavior was an implementation detail of
11710- CPython from 3.6.
11711-
1171211744 Dictionaries and dictionary views are reversible.
1171311745
1171411746 >>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
@@ -12093,6 +12125,8 @@ class dict(iterable, **kwargs)
1209312125| "s[i] = x" | item *i* of *s* is replaced by | |
1209412126| | *x* | |
1209512127+--------------------------------+----------------------------------+-----------------------+
12128+ | "del s[i]" | removes item *i* of *s* | |
12129+ +--------------------------------+----------------------------------+-----------------------+
1209612130| "s[i:j] = t" | slice of *s* from *i* to *j* is | |
1209712131| | replaced by the contents of the | |
1209812132| | iterable *t* | |
@@ -12421,6 +12455,8 @@ class range(start, stop[, step])
1242112455| "s[i] = x" | item *i* of *s* is replaced by | |
1242212456| | *x* | |
1242312457+--------------------------------+----------------------------------+-----------------------+
12458+ | "del s[i]" | removes item *i* of *s* | |
12459+ +--------------------------------+----------------------------------+-----------------------+
1242412460| "s[i:j] = t" | slice of *s* from *i* to *j* is | |
1242512461| | replaced by the contents of the | |
1242612462| | iterable *t* | |
0 commit comments