1
- # Autogenerated by Sphinx on Tue Apr 8 15:54:03 2025
1
+ # Autogenerated by Sphinx on Tue Jun 3 17:34:20 2025
2
2
# as part of the release process.
3
3
4
4
topics = {
@@ -4385,7 +4385,7 @@ class pdb.Pdb(completekey='tab', stdin=None, stdout=None, skip=None, nosigint=Fa
4385
4385
When using "pdb.pm()" or "Pdb.post_mortem(...)" with a chained
4386
4386
exception instead of a traceback, it allows the user to move
4387
4387
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.
4389
4389
4390
4390
Example:
4391
4391
@@ -9011,7 +9011,14 @@ class is used in a class pattern with positional arguments, each
9011
9011
Return centered in a string of length *width*. Padding is done
9012
9012
using the specified *fillchar* (default is an ASCII space). The
9013
9013
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'
9015
9022
9016
9023
str.count(sub[, start[, end]])
9017
9024
@@ -9020,7 +9027,18 @@ class is used in a class pattern with positional arguments, each
9020
9027
*end* are interpreted as in slice notation.
9021
9028
9022
9029
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
9024
9042
9025
9043
str.encode(encoding='utf-8', errors='strict')
9026
9044
@@ -9217,8 +9235,8 @@ class is used in a class pattern with positional arguments, each
9217
9235
9218
9236
str.isprintable()
9219
9237
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.
9222
9240
9223
9241
Here “printable” means the character is suitable for "repr()" to
9224
9242
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
9465
9483
>>> ' 1 2 3 '.split()
9466
9484
['1', '2', '3']
9467
9485
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
+
9468
9498
str.splitlines(keepends=False)
9469
9499
9470
9500
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
11144
11174
Flags for details on the semantics of each flags that might be
11145
11175
present.
11146
11176
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".
11152
11181
11153
11182
Other bits in "co_flags" are reserved for internal use.
11154
11183
@@ -11496,8 +11525,15 @@ class dict(iterable, **kwargs)
11496
11525
the keyword argument replaces the value from the positional
11497
11526
argument.
11498
11527
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}":
11501
11537
11502
11538
>>> a = dict(one=1, two=2, three=3)
11503
11539
>>> b = {'one': 1, 'two': 2, 'three': 3}
@@ -11512,6 +11548,29 @@ class dict(iterable, **kwargs)
11512
11548
keys that are valid Python identifiers. Otherwise, any valid keys
11513
11549
can be used.
11514
11550
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
+
11515
11574
These are the operations that dictionaries support (and therefore,
11516
11575
custom mapping types should support too):
11517
11576
@@ -11682,33 +11741,6 @@ class dict(iterable, **kwargs)
11682
11741
11683
11742
Added in version 3.9.
11684
11743
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
-
11712
11744
Dictionaries and dictionary views are reversible.
11713
11745
11714
11746
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
@@ -12093,6 +12125,8 @@ class dict(iterable, **kwargs)
12093
12125
| "s[i] = x" | item *i* of *s* is replaced by | |
12094
12126
| | *x* | |
12095
12127
+--------------------------------+----------------------------------+-----------------------+
12128
+ | "del s[i]" | removes item *i* of *s* | |
12129
+ +--------------------------------+----------------------------------+-----------------------+
12096
12130
| "s[i:j] = t" | slice of *s* from *i* to *j* is | |
12097
12131
| | replaced by the contents of the | |
12098
12132
| | iterable *t* | |
@@ -12421,6 +12455,8 @@ class range(start, stop[, step])
12421
12455
| "s[i] = x" | item *i* of *s* is replaced by | |
12422
12456
| | *x* | |
12423
12457
+--------------------------------+----------------------------------+-----------------------+
12458
+ | "del s[i]" | removes item *i* of *s* | |
12459
+ +--------------------------------+----------------------------------+-----------------------+
12424
12460
| "s[i:j] = t" | slice of *s* from *i* to *j* is | |
12425
12461
| | replaced by the contents of the | |
12426
12462
| | iterable *t* | |
0 commit comments