mirror of
https://github.com/python/cpython.git
synced 2025-10-27 03:34:32 +00:00
Python 3.13.6
This commit is contained in:
parent
5c5574bfeb
commit
4e66535108
66 changed files with 701 additions and 172 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Autogenerated by Sphinx on Wed Jun 11 17:36:53 2025
|
||||
# Autogenerated by Sphinx on Wed Aug 6 15:05:15 2025
|
||||
# as part of the release process.
|
||||
|
||||
topics = {
|
||||
|
|
@ -9055,7 +9055,13 @@ class is used in a class pattern with positional arguments, each
|
|||
|
||||
For performance reasons, the value of *errors* is not checked for
|
||||
validity unless an encoding error actually occurs, Python
|
||||
Development Mode is enabled or a debug build is used.
|
||||
Development Mode is enabled or a debug build is used. For example:
|
||||
|
||||
>>> encoded_str_to_bytes = 'Python'.encode()
|
||||
>>> type(encoded_str_to_bytes)
|
||||
<class 'bytes'>
|
||||
>>> encoded_str_to_bytes
|
||||
b'Python'
|
||||
|
||||
Changed in version 3.1: Added support for keyword arguments.
|
||||
|
||||
|
|
@ -9068,6 +9074,19 @@ class is used in a class pattern with positional arguments, each
|
|||
otherwise return "False". *suffix* can also be a tuple of suffixes
|
||||
to look for. With optional *start*, test beginning at that
|
||||
position. With optional *end*, stop comparing at that position.
|
||||
Using *start* and *end* is equivalent to
|
||||
"str[start:end].endswith(suffix)". For example:
|
||||
|
||||
>>> 'Python'.endswith('on')
|
||||
True
|
||||
>>> 'a tuple of suffixes'.endswith(('at', 'in'))
|
||||
False
|
||||
>>> 'a tuple of suffixes'.endswith(('at', 'es'))
|
||||
True
|
||||
>>> 'Python is amazing'.endswith('is', 0, 9)
|
||||
True
|
||||
|
||||
See also "startswith()" and "removesuffix()".
|
||||
|
||||
str.expandtabs(tabsize=8)
|
||||
|
||||
|
|
@ -9083,12 +9102,15 @@ class is used in a class pattern with positional arguments, each
|
|||
("\n") or return ("\r"), it is copied and the current column is
|
||||
reset to zero. Any other character is copied unchanged and the
|
||||
current column is incremented by one regardless of how the
|
||||
character is represented when printed.
|
||||
character is represented when printed. For example:
|
||||
|
||||
>>> '01\t012\t0123\t01234'.expandtabs()
|
||||
'01 012 0123 01234'
|
||||
>>> '01\t012\t0123\t01234'.expandtabs(4)
|
||||
'01 012 0123 01234'
|
||||
>>> '01\t012\t0123\t01234'.expandtabs()
|
||||
'01 012 0123 01234'
|
||||
>>> '01\t012\t0123\t01234'.expandtabs(4)
|
||||
'01 012 0123 01234'
|
||||
>>> print('01\t012\n0123\t01234'.expandtabs(4))
|
||||
01 012
|
||||
0123 01234
|
||||
|
||||
str.find(sub[, start[, end]])
|
||||
|
||||
|
|
@ -12133,7 +12155,9 @@ class dict(iterable, **kwargs)
|
|||
| | replaced by the contents of the | |
|
||||
| | iterable *t* | |
|
||||
+--------------------------------+----------------------------------+-----------------------+
|
||||
| "del s[i:j]" | same as "s[i:j] = []" | |
|
||||
| "del s[i:j]" | removes the elements of "s[i:j]" | |
|
||||
| | from the list (same as "s[i:j] = | |
|
||||
| | []") | |
|
||||
+--------------------------------+----------------------------------+-----------------------+
|
||||
| "s[i:j:k] = t" | the elements of "s[i:j:k]" are | (1) |
|
||||
| | replaced by those of *t* | |
|
||||
|
|
@ -12463,7 +12487,9 @@ class range(start, stop[, step])
|
|||
| | replaced by the contents of the | |
|
||||
| | iterable *t* | |
|
||||
+--------------------------------+----------------------------------+-----------------------+
|
||||
| "del s[i:j]" | same as "s[i:j] = []" | |
|
||||
| "del s[i:j]" | removes the elements of "s[i:j]" | |
|
||||
| | from the list (same as "s[i:j] = | |
|
||||
| | []") | |
|
||||
+--------------------------------+----------------------------------+-----------------------+
|
||||
| "s[i:j:k] = t" | the elements of "s[i:j:k]" are | (1) |
|
||||
| | replaced by those of *t* | |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue