Python 3.13.4

This commit is contained in:
Thomas Wouters 2025-06-03 17:34:08 +02:00
parent aa9eb5f757
commit 8a526ec7cb
101 changed files with 1037 additions and 246 deletions

View file

@ -1,4 +1,4 @@
# Autogenerated by Sphinx on Tue Apr 8 15:54:03 2025
# Autogenerated by Sphinx on Tue Jun 3 17:34:20 2025
# as part of the release process.
topics = {
@ -4385,7 +4385,7 @@ class pdb.Pdb(completekey='tab', stdin=None, stdout=None, skip=None, nosigint=Fa
When using "pdb.pm()" or "Pdb.post_mortem(...)" with a chained
exception instead of a traceback, it allows the user to move
between the chained exceptions using "exceptions" command to list
exceptions, and "exception <number>" to switch to that exception.
exceptions, and "exceptions <number>" to switch to that exception.
Example:
@ -9011,7 +9011,14 @@ class is used in a class pattern with positional arguments, each
Return centered in a string of length *width*. Padding is done
using the specified *fillchar* (default is an ASCII space). The
original string is returned if *width* is less than or equal to
"len(s)".
"len(s)". For example:
>>> 'Python'.center(10)
' Python '
>>> 'Python'.center(10, '-')
'--Python--'
>>> 'Python'.center(4)
'Python'
str.count(sub[, start[, end]])
@ -9020,7 +9027,18 @@ class is used in a class pattern with positional arguments, each
*end* are interpreted as in slice notation.
If *sub* is empty, returns the number of empty strings between
characters which is the length of the string plus one.
characters which is the length of the string plus one. For example:
>>> 'spam, spam, spam'.count('spam')
3
>>> 'spam, spam, spam'.count('spam', 5)
2
>>> 'spam, spam, spam'.count('spam', 5, 10)
1
>>> 'spam, spam, spam'.count('eggs')
0
>>> 'spam, spam, spam'.count('')
17
str.encode(encoding='utf-8', errors='strict')
@ -9217,8 +9235,8 @@ class is used in a class pattern with positional arguments, each
str.isprintable()
Return true if all characters in the string are printable, false if
it contains at least one non-printable character.
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
@ -9465,6 +9483,18 @@ class is used in a class pattern with positional arguments, each
>>> ' 1 2 3 '.split()
['1', '2', '3']
If *sep* is not specified or is "None" and *maxsplit* is "0", only
leading runs of consecutive whitespace are considered.
For example:
>>> "".split(None, 0)
[]
>>> " ".split(None, 0)
[]
>>> " foo ".split(maxsplit=0)
['foo ']
str.splitlines(keepends=False)
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
Flags for details on the semantics of each flags that might be
present.
Future feature declarations ("from __future__ import division") also
use bits in "co_flags" to indicate whether a code object was compiled
with a particular feature enabled: bit "0x2000" is set if the function
was compiled with future division enabled; bits "0x10" and "0x1000"
were used in earlier versions of Python.
Future feature declarations (for example, "from __future__ import
division") also use bits in "co_flags" to indicate whether a code
object was compiled with a particular feature enabled. See
"compiler_flag".
Other bits in "co_flags" are reserved for internal use.
@ -11496,8 +11525,15 @@ class dict(iterable, **kwargs)
the keyword argument replaces the value from the positional
argument.
To illustrate, the following examples all return a dictionary equal
to "{"one": 1, "two": 2, "three": 3}":
Providing keyword arguments as in the first example only works for
keys that are valid Python identifiers. Otherwise, any valid keys
can be used.
Dictionaries compare equal if and only if they have the same "(key,
value)" pairs (regardless of ordering). Order comparisons (<,
<=, >=, >) raise "TypeError". To illustrate dictionary
creation and equality, the following examples all return a
dictionary equal to "{"one": 1, "two": 2, "three": 3}":
>>> a = dict(one=1, two=2, three=3)
>>> b = {'one': 1, 'two': 2, 'three': 3}
@ -11512,6 +11548,29 @@ class dict(iterable, **kwargs)
keys that are valid Python identifiers. Otherwise, any valid keys
can be used.
Dictionaries preserve insertion order. Note that updating a key
does not affect the order. Keys added after deletion are inserted
at the end.
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
>>> d
{'one': 1, 'two': 2, 'three': 3, 'four': 4}
>>> list(d)
['one', 'two', 'three', 'four']
>>> list(d.values())
[1, 2, 3, 4]
>>> d["one"] = 42
>>> d
{'one': 42, 'two': 2, 'three': 3, 'four': 4}
>>> del d["two"]
>>> d["two"] = None
>>> d
{'one': 42, 'three': 3, 'four': 4, 'two': None}
Changed in version 3.7: Dictionary order is guaranteed to be
insertion order. This behavior was an implementation detail of
CPython from 3.6.
These are the operations that dictionaries support (and therefore,
custom mapping types should support too):
@ -11682,33 +11741,6 @@ class dict(iterable, **kwargs)
Added in version 3.9.
Dictionaries compare equal if and only if they have the same "(key,
value)" pairs (regardless of ordering). Order comparisons (<,
<=, >=, >) raise "TypeError".
Dictionaries preserve insertion order. Note that updating a key
does not affect the order. Keys added after deletion are inserted
at the end.
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
>>> d
{'one': 1, 'two': 2, 'three': 3, 'four': 4}
>>> list(d)
['one', 'two', 'three', 'four']
>>> list(d.values())
[1, 2, 3, 4]
>>> d["one"] = 42
>>> d
{'one': 42, 'two': 2, 'three': 3, 'four': 4}
>>> del d["two"]
>>> d["two"] = None
>>> d
{'one': 42, 'three': 3, 'four': 4, 'two': None}
Changed in version 3.7: Dictionary order is guaranteed to be
insertion order. This behavior was an implementation detail of
CPython from 3.6.
Dictionaries and dictionary views are reversible.
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
@ -12093,6 +12125,8 @@ class dict(iterable, **kwargs)
| "s[i] = x" | item *i* of *s* is replaced by | |
| | *x* | |
+--------------------------------+----------------------------------+-----------------------+
| "del s[i]" | removes item *i* of *s* | |
+--------------------------------+----------------------------------+-----------------------+
| "s[i:j] = t" | slice of *s* from *i* to *j* is | |
| | replaced by the contents of the | |
| | iterable *t* | |
@ -12421,6 +12455,8 @@ class range(start, stop[, step])
| "s[i] = x" | item *i* of *s* is replaced by | |
| | *x* | |
+--------------------------------+----------------------------------+-----------------------+
| "del s[i]" | removes item *i* of *s* | |
+--------------------------------+----------------------------------+-----------------------+
| "s[i:j] = t" | slice of *s* from *i* to *j* is | |
| | replaced by the contents of the | |
| | iterable *t* | |