basedpyright 1.18.4 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright-langserver.js.map +1 -1
  3. package/dist/pyright.js +1 -1
  4. package/dist/pyright.js.map +1 -1
  5. package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +6 -2
  6. package/dist/typeshed-fallback/stdlib/_csv.pyi +1 -63
  7. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +29 -3
  8. package/dist/typeshed-fallback/stdlib/_interpchannels.pyi +258 -86
  9. package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +100 -16
  10. package/dist/typeshed-fallback/stdlib/_interpreters.pyi +204 -50
  11. package/dist/typeshed-fallback/stdlib/_json.pyi +1 -1
  12. package/dist/typeshed-fallback/stdlib/_socket.pyi +5 -26
  13. package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +24 -9
  14. package/dist/typeshed-fallback/stdlib/_stat.pyi +13 -2
  15. package/dist/typeshed-fallback/stdlib/_thread.pyi +35 -93
  16. package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +3 -1
  17. package/dist/typeshed-fallback/stdlib/atexit.pyi +6 -20
  18. package/dist/typeshed-fallback/stdlib/builtins.pyi +250 -251
  19. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +8 -7
  20. package/dist/typeshed-fallback/stdlib/datetime.pyi +9 -3
  21. package/dist/typeshed-fallback/stdlib/dbm/sqlite3.pyi +29 -29
  22. package/dist/typeshed-fallback/stdlib/dis.pyi +33 -7
  23. package/dist/typeshed-fallback/stdlib/functools.pyi +2 -2
  24. package/dist/typeshed-fallback/stdlib/gc.pyi +5 -11
  25. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +17 -2
  26. package/dist/typeshed-fallback/stdlib/importlib/metadata/diagnose.pyi +2 -2
  27. package/dist/typeshed-fallback/stdlib/importlib/resources/_functional.pyi +30 -30
  28. package/dist/typeshed-fallback/stdlib/io.pyi +3 -1
  29. package/dist/typeshed-fallback/stdlib/ipaddress.pyi +8 -1
  30. package/dist/typeshed-fallback/stdlib/itertools.pyi +3 -6
  31. package/dist/typeshed-fallback/stdlib/marshal.pyi +61 -4
  32. package/dist/typeshed-fallback/stdlib/math.pyi +7 -1
  33. package/dist/typeshed-fallback/stdlib/mmap.pyi +1 -1
  34. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +14 -2
  35. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +43 -9
  36. package/dist/typeshed-fallback/stdlib/posixpath.pyi +14 -2
  37. package/dist/typeshed-fallback/stdlib/signal.pyi +2 -3
  38. package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +54 -6
  39. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +11 -17
  40. package/dist/typeshed-fallback/stdlib/threading.pyi +44 -16
  41. package/dist/typeshed-fallback/stdlib/time.pyi +2 -10
  42. package/dist/typeshed-fallback/stdlib/types.pyi +31 -13
  43. package/dist/typeshed-fallback/stdlib/typing.pyi +6 -2
  44. package/dist/typeshed-fallback/stdlib/unicodedata.pyi +2 -2
  45. package/package.json +1 -1
@@ -208,8 +208,6 @@ class object:
208
208
 
209
209
  class staticmethod(Generic[_P, _R_co]):
210
210
  """
211
- staticmethod(function) -> method
212
-
213
211
  Convert a function to be a static method.
214
212
 
215
213
  A static method does not receive an implicit first argument.
@@ -251,8 +249,6 @@ class staticmethod(Generic[_P, _R_co]):
251
249
 
252
250
  class classmethod(Generic[_T, _P, _R_co]):
253
251
  """
254
- classmethod(function) -> method
255
-
256
252
  Convert a function to be a class method.
257
253
 
258
254
  A class method receives the class as implicit first argument,
@@ -348,10 +344,7 @@ class type:
348
344
  ...
349
345
  @classmethod
350
346
  def __prepare__(metacls, name: str, bases: tuple[type, ...], /, **kwds: Any) -> MutableMapping[str, object]:
351
- """
352
- __prepare__() -> dict
353
- used to create the namespace for the class statement
354
- """
347
+ """Create the namespace for the class statement"""
355
348
  ...
356
349
  if sys.version_info >= (3, 10):
357
350
  def __or__(self, value: Any, /) -> types.UnionType:
@@ -484,7 +477,7 @@ class int:
484
477
  the most significant byte is at the beginning of the byte array. If
485
478
  byteorder is 'little', the most significant byte is at the end of the
486
479
  byte array. To request the native byte order of the host system, use
487
- `sys.byteorder' as the byte order value. Default is to use 'big'.
480
+ sys.byteorder as the byte order value. Default is to use 'big'.
488
481
  signed
489
482
  Determines whether two's complement is used to represent the integer.
490
483
  If signed is False and a negative integer is given, an OverflowError
@@ -512,7 +505,7 @@ class int:
512
505
  the most significant byte is at the beginning of the byte array. If
513
506
  byteorder is 'little', the most significant byte is at the end of the
514
507
  byte array. To request the native byte order of the host system, use
515
- `sys.byteorder' as the byte order value. Default is to use 'big'.
508
+ sys.byteorder as the byte order value. Default is to use 'big'.
516
509
  signed
517
510
  Indicates whether two's complement is used to represent the integer.
518
511
  """
@@ -1020,7 +1013,7 @@ class str(Sequence[str]):
1020
1013
  that will be decoded using the given encoding and error handler.
1021
1014
  Otherwise, returns the result of object.__str__() (if defined)
1022
1015
  or repr(object).
1023
- encoding defaults to sys.getdefaultencoding().
1016
+ encoding defaults to 'utf-8'.
1024
1017
  errors defaults to 'strict'.
1025
1018
  """
1026
1019
  @overload
@@ -1071,11 +1064,9 @@ class str(Sequence[str]):
1071
1064
  ...
1072
1065
  def count(self, sub: str, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /) -> int:
1073
1066
  """
1074
- S.count(sub[, start[, end]]) -> int
1067
+ Return the number of non-overlapping occurrences of substring sub in string S[start:end].
1075
1068
 
1076
- Return the number of non-overlapping occurrences of substring sub in
1077
- string S[start:end]. Optional arguments start and end are
1078
- interpreted as in slice notation.
1069
+ Optional arguments start and end are interpreted as in slice notation.
1079
1070
  """
1080
1071
  ...
1081
1072
  def encode(self, encoding: str = "utf-8", errors: str = "strict") -> bytes:
@@ -1096,12 +1087,14 @@ class str(Sequence[str]):
1096
1087
  self, suffix: str | tuple[str, ...], start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
1097
1088
  ) -> bool:
1098
1089
  """
1099
- S.endswith(suffix[, start[, end]]) -> bool
1090
+ Return True if the string ends with the specified suffix, False otherwise.
1100
1091
 
1101
- Return True if S ends with the specified suffix, False otherwise.
1102
- With optional start, test S beginning at that position.
1103
- With optional end, stop comparing S at that position.
1104
- suffix can also be a tuple of strings to try.
1092
+ suffix
1093
+ A string or a tuple of strings to try.
1094
+ start
1095
+ Optional start position. Default: start of the string.
1096
+ end
1097
+ Optional stop position. Default: end of the string.
1105
1098
  """
1106
1099
  ...
1107
1100
  @overload
@@ -1122,49 +1115,37 @@ class str(Sequence[str]):
1122
1115
  ...
1123
1116
  def find(self, sub: str, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /) -> int:
1124
1117
  """
1125
- S.find(sub[, start[, end]]) -> int
1126
-
1127
- Return the lowest index in S where substring sub is found,
1128
- such that sub is contained within S[start:end]. Optional
1129
- arguments start and end are interpreted as in slice notation.
1118
+ Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
1130
1119
 
1120
+ Optional arguments start and end are interpreted as in slice notation.
1131
1121
  Return -1 on failure.
1132
1122
  """
1133
1123
  ...
1134
1124
  @overload
1135
1125
  def format(self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString:
1136
1126
  """
1137
- S.format(*args, **kwargs) -> str
1138
-
1139
- Return a formatted version of S, using substitutions from args and kwargs.
1127
+ Return a formatted version of the string, using substitutions from args and kwargs.
1140
1128
  The substitutions are identified by braces ('{' and '}').
1141
1129
  """
1142
1130
  ...
1143
1131
  @overload
1144
1132
  def format(self, *args: object, **kwargs: object) -> str:
1145
1133
  """
1146
- S.format(*args, **kwargs) -> str
1147
-
1148
- Return a formatted version of S, using substitutions from args and kwargs.
1134
+ Return a formatted version of the string, using substitutions from args and kwargs.
1149
1135
  The substitutions are identified by braces ('{' and '}').
1150
1136
  """
1151
1137
  ...
1152
1138
  def format_map(self, mapping: _FormatMapMapping, /) -> str:
1153
1139
  """
1154
- S.format_map(mapping) -> str
1155
-
1156
- Return a formatted version of S, using substitutions from mapping.
1140
+ Return a formatted version of the string, using substitutions from mapping.
1157
1141
  The substitutions are identified by braces ('{' and '}').
1158
1142
  """
1159
1143
  ...
1160
1144
  def index(self, sub: str, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /) -> int:
1161
1145
  """
1162
- S.index(sub[, start[, end]]) -> int
1163
-
1164
- Return the lowest index in S where substring sub is found,
1165
- such that sub is contained within S[start:end]. Optional
1166
- arguments start and end are interpreted as in slice notation.
1146
+ Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
1167
1147
 
1148
+ Optional arguments start and end are interpreted as in slice notation.
1168
1149
  Raises ValueError when the substring is not found.
1169
1150
  """
1170
1151
  ...
@@ -1356,9 +1337,31 @@ class str(Sequence[str]):
1356
1337
  @overload
1357
1338
  def replace(
1358
1339
  self: LiteralString, old: LiteralString, new: LiteralString, /, count: SupportsIndex = -1
1359
- ) -> LiteralString: ...
1340
+ ) -> LiteralString:
1341
+ """
1342
+ Return a copy with all occurrences of substring old replaced by new.
1343
+
1344
+ count
1345
+ Maximum number of occurrences to replace.
1346
+ -1 (the default value) means replace all occurrences.
1347
+
1348
+ If the optional argument count is given, only the first count occurrences are
1349
+ replaced.
1350
+ """
1351
+ ...
1360
1352
  @overload
1361
- def replace(self, old: str, new: str, /, count: SupportsIndex = -1) -> str: ... # type: ignore[misc]
1353
+ def replace(self, old: str, new: str, /, count: SupportsIndex = -1) -> str:
1354
+ """
1355
+ Return a copy with all occurrences of substring old replaced by new.
1356
+
1357
+ count
1358
+ Maximum number of occurrences to replace.
1359
+ -1 (the default value) means replace all occurrences.
1360
+
1361
+ If the optional argument count is given, only the first count occurrences are
1362
+ replaced.
1363
+ """
1364
+ ...
1362
1365
  else:
1363
1366
  @overload
1364
1367
  def replace(
@@ -1430,23 +1433,17 @@ class str(Sequence[str]):
1430
1433
 
1431
1434
  def rfind(self, sub: str, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /) -> int:
1432
1435
  """
1433
- S.rfind(sub[, start[, end]]) -> int
1434
-
1435
- Return the highest index in S where substring sub is found,
1436
- such that sub is contained within S[start:end]. Optional
1437
- arguments start and end are interpreted as in slice notation.
1436
+ Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
1438
1437
 
1438
+ Optional arguments start and end are interpreted as in slice notation.
1439
1439
  Return -1 on failure.
1440
1440
  """
1441
1441
  ...
1442
1442
  def rindex(self, sub: str, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /) -> int:
1443
1443
  """
1444
- S.rindex(sub[, start[, end]]) -> int
1445
-
1446
- Return the highest index in S where substring sub is found,
1447
- such that sub is contained within S[start:end]. Optional
1448
- arguments start and end are interpreted as in slice notation.
1444
+ Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
1449
1445
 
1446
+ Optional arguments start and end are interpreted as in slice notation.
1450
1447
  Raises ValueError when the substring is not found.
1451
1448
  """
1452
1449
  ...
@@ -1610,12 +1607,14 @@ class str(Sequence[str]):
1610
1607
  self, prefix: str | tuple[str, ...], start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
1611
1608
  ) -> bool:
1612
1609
  """
1613
- S.startswith(prefix[, start[, end]]) -> bool
1610
+ Return True if the string starts with the specified prefix, False otherwise.
1614
1611
 
1615
- Return True if S starts with the specified prefix, False otherwise.
1616
- With optional start, test S beginning at that position.
1617
- With optional end, stop comparing S at that position.
1618
- prefix can also be a tuple of strings to try.
1612
+ prefix
1613
+ A string or a tuple of strings to try.
1614
+ start
1615
+ Optional start position. Default: start of the string.
1616
+ end
1617
+ Optional stop position. Default: end of the string.
1619
1618
  """
1620
1619
  ...
1621
1620
  @overload
@@ -1859,11 +1858,12 @@ class bytes(Sequence[int]):
1859
1858
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
1860
1859
  ) -> int:
1861
1860
  """
1862
- B.count(sub[, start[, end]]) -> int
1861
+ Return the number of non-overlapping occurrences of subsection 'sub' in bytes B[start:end].
1863
1862
 
1864
- Return the number of non-overlapping occurrences of subsection sub in
1865
- bytes B[start:end]. Optional arguments start and end are interpreted
1866
- as in slice notation.
1863
+ start
1864
+ Optional start position. Default: start of the bytes.
1865
+ end
1866
+ Optional stop position. Default: end of the bytes.
1867
1867
  """
1868
1868
  ...
1869
1869
  def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
@@ -1888,12 +1888,14 @@ class bytes(Sequence[int]):
1888
1888
  /,
1889
1889
  ) -> bool:
1890
1890
  """
1891
- B.endswith(suffix[, start[, end]]) -> bool
1891
+ Return True if the bytes ends with the specified suffix, False otherwise.
1892
1892
 
1893
- Return True if B ends with the specified suffix, False otherwise.
1894
- With optional start, test B beginning at that position.
1895
- With optional end, stop comparing B at that position.
1896
- suffix can also be a tuple of bytes to try.
1893
+ suffix
1894
+ A bytes or a tuple of bytes to try.
1895
+ start
1896
+ Optional start position. Default: start of the bytes.
1897
+ end
1898
+ Optional stop position. Default: end of the bytes.
1897
1899
  """
1898
1900
  ...
1899
1901
  def expandtabs(self, tabsize: SupportsIndex = 8) -> bytes:
@@ -1907,11 +1909,12 @@ class bytes(Sequence[int]):
1907
1909
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
1908
1910
  ) -> int:
1909
1911
  """
1910
- B.find(sub[, start[, end]]) -> int
1912
+ Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].
1911
1913
 
1912
- Return the lowest index in B where subsection sub is found,
1913
- such that sub is contained within B[start,end]. Optional
1914
- arguments start and end are interpreted as in slice notation.
1914
+ start
1915
+ Optional start position. Default: start of the bytes.
1916
+ end
1917
+ Optional stop position. Default: end of the bytes.
1915
1918
 
1916
1919
  Return -1 on failure.
1917
1920
  """
@@ -1942,13 +1945,14 @@ class bytes(Sequence[int]):
1942
1945
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
1943
1946
  ) -> int:
1944
1947
  """
1945
- B.index(sub[, start[, end]]) -> int
1948
+ Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].
1946
1949
 
1947
- Return the lowest index in B where subsection sub is found,
1948
- such that sub is contained within B[start,end]. Optional
1949
- arguments start and end are interpreted as in slice notation.
1950
+ start
1951
+ Optional start position. Default: start of the bytes.
1952
+ end
1953
+ Optional stop position. Default: end of the bytes.
1950
1954
 
1951
- Raises ValueError when the subsection is not found.
1955
+ Raise ValueError if the subsection is not found.
1952
1956
  """
1953
1957
  ...
1954
1958
  def isalnum(self) -> bool:
@@ -2096,11 +2100,12 @@ class bytes(Sequence[int]):
2096
2100
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
2097
2101
  ) -> int:
2098
2102
  """
2099
- B.rfind(sub[, start[, end]]) -> int
2103
+ Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].
2100
2104
 
2101
- Return the highest index in B where subsection sub is found,
2102
- such that sub is contained within B[start,end]. Optional
2103
- arguments start and end are interpreted as in slice notation.
2105
+ start
2106
+ Optional start position. Default: start of the bytes.
2107
+ end
2108
+ Optional stop position. Default: end of the bytes.
2104
2109
 
2105
2110
  Return -1 on failure.
2106
2111
  """
@@ -2109,13 +2114,14 @@ class bytes(Sequence[int]):
2109
2114
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
2110
2115
  ) -> int:
2111
2116
  """
2112
- B.rindex(sub[, start[, end]]) -> int
2117
+ Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].
2113
2118
 
2114
- Return the highest index in B where subsection sub is found,
2115
- such that sub is contained within B[start,end]. Optional
2116
- arguments start and end are interpreted as in slice notation.
2119
+ start
2120
+ Optional start position. Default: start of the bytes.
2121
+ end
2122
+ Optional stop position. Default: end of the bytes.
2117
2123
 
2118
- Raise ValueError when the subsection is not found.
2124
+ Raise ValueError if the subsection is not found.
2119
2125
  """
2120
2126
  ...
2121
2127
  def rjust(self, width: SupportsIndex, fillchar: bytes | bytearray = b" ", /) -> bytes:
@@ -2188,12 +2194,14 @@ class bytes(Sequence[int]):
2188
2194
  /,
2189
2195
  ) -> bool:
2190
2196
  """
2191
- B.startswith(prefix[, start[, end]]) -> bool
2197
+ Return True if the bytes starts with the specified prefix, False otherwise.
2192
2198
 
2193
- Return True if B starts with the specified prefix, False otherwise.
2194
- With optional start, test B beginning at that position.
2195
- With optional end, stop comparing B at that position.
2196
- prefix can also be a tuple of bytes to try.
2199
+ prefix
2200
+ A bytes or a tuple of bytes to try.
2201
+ start
2202
+ Optional start position. Default: start of the bytes.
2203
+ end
2204
+ Optional stop position. Default: end of the bytes.
2197
2205
  """
2198
2206
  ...
2199
2207
  def strip(self, bytes: ReadableBuffer | None = None, /) -> bytes:
@@ -2256,7 +2264,7 @@ class bytes(Sequence[int]):
2256
2264
  @staticmethod
2257
2265
  def maketrans(frm: ReadableBuffer, to: ReadableBuffer, /) -> bytes:
2258
2266
  """
2259
- Return a translation table useable for the bytes or bytearray translate method.
2267
+ Return a translation table usable for the bytes or bytearray translate method.
2260
2268
 
2261
2269
  The returned table will be one where each byte in frm is mapped to the byte at
2262
2270
  the same position in to.
@@ -2373,11 +2381,12 @@ class bytearray(MutableSequence[int]):
2373
2381
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
2374
2382
  ) -> int:
2375
2383
  """
2376
- B.count(sub[, start[, end]]) -> int
2384
+ Return the number of non-overlapping occurrences of subsection 'sub' in bytes B[start:end].
2377
2385
 
2378
- Return the number of non-overlapping occurrences of subsection sub in
2379
- bytes B[start:end]. Optional arguments start and end are interpreted
2380
- as in slice notation.
2386
+ start
2387
+ Optional start position. Default: start of the bytes.
2388
+ end
2389
+ Optional stop position. Default: end of the bytes.
2381
2390
  """
2382
2391
  ...
2383
2392
  def copy(self) -> bytearray:
@@ -2405,12 +2414,14 @@ class bytearray(MutableSequence[int]):
2405
2414
  /,
2406
2415
  ) -> bool:
2407
2416
  """
2408
- B.endswith(suffix[, start[, end]]) -> bool
2417
+ Return True if the bytearray ends with the specified suffix, False otherwise.
2409
2418
 
2410
- Return True if B ends with the specified suffix, False otherwise.
2411
- With optional start, test B beginning at that position.
2412
- With optional end, stop comparing B at that position.
2413
- suffix can also be a tuple of bytes to try.
2419
+ suffix
2420
+ A bytes or a tuple of bytes to try.
2421
+ start
2422
+ Optional start position. Default: start of the bytearray.
2423
+ end
2424
+ Optional stop position. Default: end of the bytearray.
2414
2425
  """
2415
2426
  ...
2416
2427
  def expandtabs(self, tabsize: SupportsIndex = 8) -> bytearray:
@@ -2432,11 +2443,12 @@ class bytearray(MutableSequence[int]):
2432
2443
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
2433
2444
  ) -> int:
2434
2445
  """
2435
- B.find(sub[, start[, end]]) -> int
2446
+ Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start:end].
2436
2447
 
2437
- Return the lowest index in B where subsection sub is found,
2438
- such that sub is contained within B[start,end]. Optional
2439
- arguments start and end are interpreted as in slice notation.
2448
+ start
2449
+ Optional start position. Default: start of the bytes.
2450
+ end
2451
+ Optional stop position. Default: end of the bytes.
2440
2452
 
2441
2453
  Return -1 on failure.
2442
2454
  """
@@ -2467,13 +2479,14 @@ class bytearray(MutableSequence[int]):
2467
2479
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
2468
2480
  ) -> int:
2469
2481
  """
2470
- B.index(sub[, start[, end]]) -> int
2482
+ Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start:end].
2471
2483
 
2472
- Return the lowest index in B where subsection sub is found,
2473
- such that sub is contained within B[start,end]. Optional
2474
- arguments start and end are interpreted as in slice notation.
2484
+ start
2485
+ Optional start position. Default: start of the bytes.
2486
+ end
2487
+ Optional stop position. Default: end of the bytes.
2475
2488
 
2476
- Raises ValueError when the subsection is not found.
2489
+ Raise ValueError if the subsection is not found.
2477
2490
  """
2478
2491
  ...
2479
2492
  def insert(self, index: SupportsIndex, item: SupportsIndex, /) -> None:
@@ -2649,11 +2662,12 @@ class bytearray(MutableSequence[int]):
2649
2662
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
2650
2663
  ) -> int:
2651
2664
  """
2652
- B.rfind(sub[, start[, end]]) -> int
2665
+ Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start:end].
2653
2666
 
2654
- Return the highest index in B where subsection sub is found,
2655
- such that sub is contained within B[start,end]. Optional
2656
- arguments start and end are interpreted as in slice notation.
2667
+ start
2668
+ Optional start position. Default: start of the bytes.
2669
+ end
2670
+ Optional stop position. Default: end of the bytes.
2657
2671
 
2658
2672
  Return -1 on failure.
2659
2673
  """
@@ -2662,13 +2676,14 @@ class bytearray(MutableSequence[int]):
2662
2676
  self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /
2663
2677
  ) -> int:
2664
2678
  """
2665
- B.rindex(sub[, start[, end]]) -> int
2679
+ Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start:end].
2666
2680
 
2667
- Return the highest index in B where subsection sub is found,
2668
- such that sub is contained within B[start,end]. Optional
2669
- arguments start and end are interpreted as in slice notation.
2681
+ start
2682
+ Optional start position. Default: start of the bytes.
2683
+ end
2684
+ Optional stop position. Default: end of the bytes.
2670
2685
 
2671
- Raise ValueError when the subsection is not found.
2686
+ Raise ValueError if the subsection is not found.
2672
2687
  """
2673
2688
  ...
2674
2689
  def rjust(self, width: SupportsIndex, fillchar: bytes | bytearray = b" ", /) -> bytearray:
@@ -2742,12 +2757,14 @@ class bytearray(MutableSequence[int]):
2742
2757
  /,
2743
2758
  ) -> bool:
2744
2759
  """
2745
- B.startswith(prefix[, start[, end]]) -> bool
2760
+ Return True if the bytearray starts with the specified prefix, False otherwise.
2746
2761
 
2747
- Return True if B starts with the specified prefix, False otherwise.
2748
- With optional start, test B beginning at that position.
2749
- With optional end, stop comparing B at that position.
2750
- prefix can also be a tuple of bytes to try.
2762
+ prefix
2763
+ A bytes or a tuple of bytes to try.
2764
+ start
2765
+ Optional start position. Default: start of the bytearray.
2766
+ end
2767
+ Optional stop position. Default: end of the bytearray.
2751
2768
  """
2752
2769
  ...
2753
2770
  def strip(self, bytes: ReadableBuffer | None = None, /) -> bytearray:
@@ -2810,7 +2827,7 @@ class bytearray(MutableSequence[int]):
2810
2827
  @staticmethod
2811
2828
  def maketrans(frm: ReadableBuffer, to: ReadableBuffer, /) -> bytes:
2812
2829
  """
2813
- Return a translation table useable for the bytes or bytearray translate method.
2830
+ Return a translation table usable for the bytes or bytearray translate method.
2814
2831
 
2815
2832
  The returned table will be one where each byte in frm is mapped to the byte at
2816
2833
  the same position in to.
@@ -2973,7 +2990,9 @@ class memoryview(Sequence[_I]):
2973
2990
  def __enter__(self) -> Self: ...
2974
2991
  def __exit__(
2975
2992
  self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
2976
- ) -> None: ...
2993
+ ) -> None:
2994
+ """Release the underlying buffer exposed by the memoryview object."""
2995
+ ...
2977
2996
  @overload
2978
2997
  def cast(self, format: Literal["c", "@c"], shape: list[int] | tuple[int, ...] = ...) -> memoryview[bytes]:
2979
2998
  """Cast a memoryview to a new format or shape."""
@@ -3083,9 +3102,7 @@ class memoryview(Sequence[_I]):
3083
3102
  @final
3084
3103
  class bool(int):
3085
3104
  """
3086
- bool(x) -> bool
3087
-
3088
- Returns True when the argument x is true, False otherwise.
3105
+ Returns True when the argument is true, False otherwise.
3089
3106
  The builtins True and False are the only two instances of the class bool.
3090
3107
  The class bool is a subclass of the class int, and cannot be subclassed.
3091
3108
  """
@@ -3480,16 +3497,16 @@ class dict(MutableMapping[_KT, _VT]):
3480
3497
  def __init__(self: dict[bytes, bytes], iterable: Iterable[list[bytes]], /) -> None: ...
3481
3498
  def __new__(cls, *args: Any, **kwargs: Any) -> Self: ...
3482
3499
  def copy(self) -> dict[_KT, _VT]:
3483
- """D.copy() -> a shallow copy of D"""
3500
+ """Return a shallow copy of the dict."""
3484
3501
  ...
3485
3502
  def keys(self) -> dict_keys[_KT, _VT]:
3486
- """D.keys() -> a set-like object providing a view on D's keys"""
3503
+ """Return a set-like object providing a view on the dict's keys."""
3487
3504
  ...
3488
3505
  def values(self) -> dict_values[_KT, _VT]:
3489
- """D.values() -> an object providing a view on D's values"""
3506
+ """Return an object providing a view on the dict's values."""
3490
3507
  ...
3491
3508
  def items(self) -> dict_items[_KT, _VT]:
3492
- """D.items() -> a set-like object providing a view on D's items"""
3509
+ """Return a set-like object providing a view on the dict's items."""
3493
3510
  ...
3494
3511
  # Signature of `dict.fromkeys` should be kept identical to
3495
3512
  # `fromkeys` methods of `OrderedDict`/`ChainMap`/`UserDict` in `collections`
@@ -3598,12 +3615,7 @@ class dict(MutableMapping[_KT, _VT]):
3598
3615
  ...
3599
3616
 
3600
3617
  class set(MutableSet[_T]):
3601
- """
3602
- set() -> new empty set object
3603
- set(iterable) -> new set object
3604
-
3605
- Build an unordered collection of unique elements.
3606
- """
3618
+ """Build an unordered collection of unique elements."""
3607
3619
  @overload
3608
3620
  def __init__(self) -> None: ...
3609
3621
  @overload
@@ -3619,14 +3631,10 @@ class set(MutableSet[_T]):
3619
3631
  """Return a shallow copy of a set."""
3620
3632
  ...
3621
3633
  def difference(self, *s: Iterable[Any]) -> set[_T]:
3622
- """
3623
- Return the difference of two or more sets as a new set.
3624
-
3625
- (i.e. all elements that are in this set but not the others.)
3626
- """
3634
+ """Return a new set with elements in the set that are not in the others."""
3627
3635
  ...
3628
3636
  def difference_update(self, *s: Iterable[Any]) -> None:
3629
- """Remove all elements of another set from this set."""
3637
+ """Update the set, removing elements found in others."""
3630
3638
  ...
3631
3639
  def discard(self, element: _T, /) -> None:
3632
3640
  """
@@ -3637,23 +3645,19 @@ class set(MutableSet[_T]):
3637
3645
  """
3638
3646
  ...
3639
3647
  def intersection(self, *s: Iterable[Any]) -> set[_T]:
3640
- """
3641
- Return the intersection of two sets as a new set.
3642
-
3643
- (i.e. all elements that are in both sets.)
3644
- """
3648
+ """Return a new set with elements common to the set and all others."""
3645
3649
  ...
3646
3650
  def intersection_update(self, *s: Iterable[Any]) -> None:
3647
- """Update a set with the intersection of itself and another."""
3651
+ """Update the set, keeping only elements found in it and all others."""
3648
3652
  ...
3649
3653
  def isdisjoint(self, s: Iterable[Any], /) -> bool:
3650
3654
  """Return True if two sets have a null intersection."""
3651
3655
  ...
3652
3656
  def issubset(self, s: Iterable[Any], /) -> bool:
3653
- """Test whether every element in the set is in other."""
3657
+ """Report whether another set contains this set."""
3654
3658
  ...
3655
3659
  def issuperset(self, s: Iterable[Any], /) -> bool:
3656
- """Test whether every element in other is in the set."""
3660
+ """Report whether this set contains another set."""
3657
3661
  ...
3658
3662
  def remove(self, element: _T, /) -> None:
3659
3663
  """
@@ -3663,24 +3667,16 @@ class set(MutableSet[_T]):
3663
3667
  """
3664
3668
  ...
3665
3669
  def symmetric_difference(self, s: Iterable[_T], /) -> set[_T]:
3666
- """
3667
- Return the symmetric difference of two sets as a new set.
3668
-
3669
- (i.e. all elements that are in exactly one of the sets.)
3670
- """
3670
+ """Return a new set with elements in either the set or other but not both."""
3671
3671
  ...
3672
3672
  def symmetric_difference_update(self, s: Iterable[_T], /) -> None:
3673
- """Update a set with the symmetric difference of itself and another."""
3673
+ """Update the set, keeping only elements found in either set, but not in both."""
3674
3674
  ...
3675
3675
  def union(self, *s: Iterable[_S]) -> set[_T | _S]:
3676
- """
3677
- Return the union of sets as a new set.
3678
-
3679
- (i.e. all elements that are in either set.)
3680
- """
3676
+ """Return a new set with elements from the set and all others."""
3681
3677
  ...
3682
3678
  def update(self, *s: Iterable[_T]) -> None:
3683
- """Update a set with the union of itself and others."""
3679
+ """Update the set, adding elements from all others."""
3684
3680
  ...
3685
3681
  def __len__(self) -> int:
3686
3682
  """Return len(self)."""
@@ -3737,12 +3733,7 @@ class set(MutableSet[_T]):
3737
3733
  ...
3738
3734
 
3739
3735
  class frozenset(AbstractSet[_T_co]):
3740
- """
3741
- frozenset() -> empty frozenset object
3742
- frozenset(iterable) -> frozenset object
3743
-
3744
- Build an immutable unordered collection of unique elements.
3745
- """
3736
+ """Build an immutable unordered collection of unique elements."""
3746
3737
  @overload
3747
3738
  def __new__(cls) -> Self: ...
3748
3739
  @overload
@@ -3751,41 +3742,25 @@ class frozenset(AbstractSet[_T_co]):
3751
3742
  """Return a shallow copy of a set."""
3752
3743
  ...
3753
3744
  def difference(self, *s: Iterable[object]) -> frozenset[_T_co]:
3754
- """
3755
- Return the difference of two or more sets as a new set.
3756
-
3757
- (i.e. all elements that are in this set but not the others.)
3758
- """
3745
+ """Return a new set with elements in the set that are not in the others."""
3759
3746
  ...
3760
3747
  def intersection(self, *s: Iterable[object]) -> frozenset[_T_co]:
3761
- """
3762
- Return the intersection of two sets as a new set.
3763
-
3764
- (i.e. all elements that are in both sets.)
3765
- """
3748
+ """Return a new set with elements common to the set and all others."""
3766
3749
  ...
3767
3750
  def isdisjoint(self, s: Iterable[_T_co], /) -> bool:
3768
3751
  """Return True if two sets have a null intersection."""
3769
3752
  ...
3770
3753
  def issubset(self, s: Iterable[object], /) -> bool:
3771
- """Test whether every element in the set is in other."""
3754
+ """Report whether another set contains this set."""
3772
3755
  ...
3773
3756
  def issuperset(self, s: Iterable[object], /) -> bool:
3774
- """Test whether every element in other is in the set."""
3757
+ """Report whether this set contains another set."""
3775
3758
  ...
3776
3759
  def symmetric_difference(self, s: Iterable[_T_co], /) -> frozenset[_T_co]:
3777
- """
3778
- Return the symmetric difference of two sets as a new set.
3779
-
3780
- (i.e. all elements that are in exactly one of the sets.)
3781
- """
3760
+ """Return a new set with elements in either the set or other but not both."""
3782
3761
  ...
3783
3762
  def union(self, *s: Iterable[_S]) -> frozenset[_T_co | _S]:
3784
- """
3785
- Return the union of sets as a new set.
3786
-
3787
- (i.e. all elements that are in either set.)
3788
- """
3763
+ """Return a new set with elements from the set and all others."""
3789
3764
  ...
3790
3765
  def __len__(self) -> int:
3791
3766
  """Return len(self)."""
@@ -4027,8 +4002,6 @@ def bin(number: int | SupportsIndex, /) -> str:
4027
4002
  ...
4028
4003
  def breakpoint(*args: Any, **kws: Any) -> None:
4029
4004
  """
4030
- breakpoint(*args, **kws)
4031
-
4032
4005
  Call sys.breakpointhook(*args, **kws). sys.breakpointhook() must accept
4033
4006
  whatever arguments are passed.
4034
4007
 
@@ -4066,19 +4039,19 @@ if sys.version_info >= (3, 10):
4066
4039
  # See discussion in #7491 and pure-Python implementation of `anext` at https://github.com/python/cpython/blob/ea786a882b9ed4261eafabad6011bc7ef3b5bf94/Lib/test/test_asyncgen.py#L52-L80
4067
4040
  def anext(i: _SupportsSynchronousAnext[_AwaitableT], /) -> _AwaitableT:
4068
4041
  """
4069
- async anext(aiterator[, default])
4042
+ Return the next item from the async iterator.
4070
4043
 
4071
- Return the next item from the async iterator. If default is given and the async
4072
- iterator is exhausted, it is returned instead of raising StopAsyncIteration.
4044
+ If default is given and the async iterator is exhausted,
4045
+ it is returned instead of raising StopAsyncIteration.
4073
4046
  """
4074
4047
  ...
4075
4048
  @overload
4076
4049
  async def anext(i: SupportsAnext[_T], default: _VT, /) -> _T | _VT:
4077
4050
  """
4078
- async anext(aiterator[, default])
4051
+ Return the next item from the async iterator.
4079
4052
 
4080
- Return the next item from the async iterator. If default is given and the async
4081
- iterator is exhausted, it is returned instead of raising StopAsyncIteration.
4053
+ If default is given and the async iterator is exhausted,
4054
+ it is returned instead of raising StopAsyncIteration.
4082
4055
  """
4083
4056
  ...
4084
4057
 
@@ -4199,7 +4172,7 @@ def delattr(obj: object, name: str, /) -> None:
4199
4172
  ...
4200
4173
  def dir(o: object = ..., /) -> list[str]:
4201
4174
  """
4202
- Show attributes of an object.
4175
+ dir([object]) -> list of strings
4203
4176
 
4204
4177
  If called without an argument, return the names in the current scope.
4205
4178
  Else, return an alphabetized list of names comprising (some of) the attributes
@@ -4230,7 +4203,17 @@ if sys.version_info >= (3, 13):
4230
4203
  /,
4231
4204
  globals: dict[str, Any] | None = None,
4232
4205
  locals: Mapping[str, object] | None = None,
4233
- ) -> Any: ...
4206
+ ) -> Any:
4207
+ """
4208
+ Evaluate the given source in the context of globals and locals.
4209
+
4210
+ The source may be a string representing a Python expression
4211
+ or a code object as returned by compile().
4212
+ The globals must be a dictionary and locals can be any mapping,
4213
+ defaulting to the current globals and locals.
4214
+ If only globals is given, locals defaults to it.
4215
+ """
4216
+ ...
4234
4217
 
4235
4218
  else:
4236
4219
  def eval(
@@ -4259,7 +4242,19 @@ if sys.version_info >= (3, 13):
4259
4242
  locals: Mapping[str, object] | None = None,
4260
4243
  *,
4261
4244
  closure: tuple[CellType, ...] | None = None,
4262
- ) -> None: ...
4245
+ ) -> None:
4246
+ """
4247
+ Execute the given source in the context of globals and locals.
4248
+
4249
+ The source may be a string representing one or more Python statements
4250
+ or a code object as returned by compile().
4251
+ The globals must be a dictionary and locals can be any mapping,
4252
+ defaulting to the current globals and locals.
4253
+ If only globals is given, locals defaults to it.
4254
+ The closure must be a tuple of cellvars, and can only be used
4255
+ when source is a code object requiring exactly that many cellvars.
4256
+ """
4257
+ ...
4263
4258
 
4264
4259
  elif sys.version_info >= (3, 11):
4265
4260
  def exec(
@@ -4305,8 +4300,6 @@ def exit(code: sys._ExitCode = None) -> NoReturn: ...
4305
4300
 
4306
4301
  class filter(Iterator[_T]):
4307
4302
  """
4308
- filter(function or None, iterable) --> filter object
4309
-
4310
4303
  Return an iterator yielding those items of iterable for which function(item)
4311
4304
  is true. If function is None, return the items that are true.
4312
4305
  """
@@ -4340,9 +4333,9 @@ def format(value: object, format_spec: str = "", /) -> str:
4340
4333
  @overload
4341
4334
  def getattr(o: object, name: str, /) -> Any:
4342
4335
  """
4343
- Get a named attribute from an object.
4336
+ getattr(object, name[, default]) -> value
4344
4337
 
4345
- getattr(x, 'y') is equivalent to x.y
4338
+ Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4346
4339
  When a default argument is given, it is returned when the attribute doesn't
4347
4340
  exist; without it, an exception is raised in that case.
4348
4341
  """
@@ -4354,9 +4347,9 @@ def getattr(o: object, name: str, /) -> Any:
4354
4347
  @overload
4355
4348
  def getattr(o: object, name: str, default: None, /) -> Any | None:
4356
4349
  """
4357
- Get a named attribute from an object.
4350
+ getattr(object, name[, default]) -> value
4358
4351
 
4359
- getattr(x, 'y') is equivalent to x.y
4352
+ Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4360
4353
  When a default argument is given, it is returned when the attribute doesn't
4361
4354
  exist; without it, an exception is raised in that case.
4362
4355
  """
@@ -4364,9 +4357,9 @@ def getattr(o: object, name: str, default: None, /) -> Any | None:
4364
4357
  @overload
4365
4358
  def getattr(o: object, name: str, default: bool, /) -> Any | bool:
4366
4359
  """
4367
- Get a named attribute from an object.
4360
+ getattr(object, name[, default]) -> value
4368
4361
 
4369
- getattr(x, 'y') is equivalent to x.y
4362
+ Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4370
4363
  When a default argument is given, it is returned when the attribute doesn't
4371
4364
  exist; without it, an exception is raised in that case.
4372
4365
  """
@@ -4374,9 +4367,9 @@ def getattr(o: object, name: str, default: bool, /) -> Any | bool:
4374
4367
  @overload
4375
4368
  def getattr(o: object, name: str, default: list[Any], /) -> Any | list[Any]:
4376
4369
  """
4377
- Get a named attribute from an object.
4370
+ getattr(object, name[, default]) -> value
4378
4371
 
4379
- getattr(x, 'y') is equivalent to x.y
4372
+ Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4380
4373
  When a default argument is given, it is returned when the attribute doesn't
4381
4374
  exist; without it, an exception is raised in that case.
4382
4375
  """
@@ -4384,9 +4377,9 @@ def getattr(o: object, name: str, default: list[Any], /) -> Any | list[Any]:
4384
4377
  @overload
4385
4378
  def getattr(o: object, name: str, default: dict[Any, Any], /) -> Any | dict[Any, Any]:
4386
4379
  """
4387
- Get a named attribute from an object.
4380
+ getattr(object, name[, default]) -> value
4388
4381
 
4389
- getattr(x, 'y') is equivalent to x.y
4382
+ Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4390
4383
  When a default argument is given, it is returned when the attribute doesn't
4391
4384
  exist; without it, an exception is raised in that case.
4392
4385
  """
@@ -4394,9 +4387,9 @@ def getattr(o: object, name: str, default: dict[Any, Any], /) -> Any | dict[Any,
4394
4387
  @overload
4395
4388
  def getattr(o: object, name: str, default: _T, /) -> Any | _T:
4396
4389
  """
4397
- Get a named attribute from an object.
4390
+ getattr(object, name[, default]) -> value
4398
4391
 
4399
- getattr(x, 'y') is equivalent to x.y
4392
+ Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4400
4393
  When a default argument is given, it is returned when the attribute doesn't
4401
4394
  exist; without it, an exception is raised in that case.
4402
4395
  """
@@ -4459,36 +4452,44 @@ class _GetItemIterable(Protocol[_T_co]):
4459
4452
  @overload
4460
4453
  def iter(object: SupportsIter[_SupportsNextT], /) -> _SupportsNextT:
4461
4454
  """
4462
- Get an iterator from an object.
4455
+ iter(iterable) -> iterator
4456
+ iter(callable, sentinel) -> iterator
4463
4457
 
4464
- In the first form, the argument must supply its own iterator, or be a sequence.
4458
+ Get an iterator from an object. In the first form, the argument must
4459
+ supply its own iterator, or be a sequence.
4465
4460
  In the second form, the callable is called until it returns the sentinel.
4466
4461
  """
4467
4462
  ...
4468
4463
  @overload
4469
4464
  def iter(object: _GetItemIterable[_T], /) -> Iterator[_T]:
4470
4465
  """
4471
- Get an iterator from an object.
4466
+ iter(iterable) -> iterator
4467
+ iter(callable, sentinel) -> iterator
4472
4468
 
4473
- In the first form, the argument must supply its own iterator, or be a sequence.
4469
+ Get an iterator from an object. In the first form, the argument must
4470
+ supply its own iterator, or be a sequence.
4474
4471
  In the second form, the callable is called until it returns the sentinel.
4475
4472
  """
4476
4473
  ...
4477
4474
  @overload
4478
4475
  def iter(object: Callable[[], _T | None], sentinel: None, /) -> Iterator[_T]:
4479
4476
  """
4480
- Get an iterator from an object.
4477
+ iter(iterable) -> iterator
4478
+ iter(callable, sentinel) -> iterator
4481
4479
 
4482
- In the first form, the argument must supply its own iterator, or be a sequence.
4480
+ Get an iterator from an object. In the first form, the argument must
4481
+ supply its own iterator, or be a sequence.
4483
4482
  In the second form, the callable is called until it returns the sentinel.
4484
4483
  """
4485
4484
  ...
4486
4485
  @overload
4487
4486
  def iter(object: Callable[[], _T], sentinel: object, /) -> Iterator[_T]:
4488
4487
  """
4489
- Get an iterator from an object.
4488
+ iter(iterable) -> iterator
4489
+ iter(callable, sentinel) -> iterator
4490
4490
 
4491
- In the first form, the argument must supply its own iterator, or be a sequence.
4491
+ Get an iterator from an object. In the first form, the argument must
4492
+ supply its own iterator, or be a sequence.
4492
4493
  In the second form, the callable is called until it returns the sentinel.
4493
4494
  """
4494
4495
  ...
@@ -4533,8 +4534,6 @@ def locals() -> dict[str, Any]:
4533
4534
 
4534
4535
  class map(Iterator[_S]):
4535
4536
  """
4536
- map(func, *iterables) --> map object
4537
-
4538
4537
  Make an iterator that computes the function using arguments from
4539
4538
  each of the iterables. Stops when the shortest iterable is exhausted.
4540
4539
  """
@@ -4598,7 +4597,7 @@ def max(
4598
4597
  With a single iterable argument, return its biggest item. The
4599
4598
  default keyword-only argument specifies an object to return if
4600
4599
  the provided iterable is empty.
4601
- With two or more arguments, return the largest argument.
4600
+ With two or more positional arguments, return the largest argument.
4602
4601
  """
4603
4602
  ...
4604
4603
  @overload
@@ -4610,7 +4609,7 @@ def max(arg1: _T, arg2: _T, /, *_args: _T, key: Callable[[_T], SupportsRichCompa
4610
4609
  With a single iterable argument, return its biggest item. The
4611
4610
  default keyword-only argument specifies an object to return if
4612
4611
  the provided iterable is empty.
4613
- With two or more arguments, return the largest argument.
4612
+ With two or more positional arguments, return the largest argument.
4614
4613
  """
4615
4614
  ...
4616
4615
  @overload
@@ -4622,7 +4621,7 @@ def max(iterable: Iterable[SupportsRichComparisonT], /, *, key: None = None) ->
4622
4621
  With a single iterable argument, return its biggest item. The
4623
4622
  default keyword-only argument specifies an object to return if
4624
4623
  the provided iterable is empty.
4625
- With two or more arguments, return the largest argument.
4624
+ With two or more positional arguments, return the largest argument.
4626
4625
  """
4627
4626
  ...
4628
4627
  @overload
@@ -4634,7 +4633,7 @@ def max(iterable: Iterable[_T], /, *, key: Callable[[_T], SupportsRichComparison
4634
4633
  With a single iterable argument, return its biggest item. The
4635
4634
  default keyword-only argument specifies an object to return if
4636
4635
  the provided iterable is empty.
4637
- With two or more arguments, return the largest argument.
4636
+ With two or more positional arguments, return the largest argument.
4638
4637
  """
4639
4638
  ...
4640
4639
  @overload
@@ -4646,7 +4645,7 @@ def max(iterable: Iterable[SupportsRichComparisonT], /, *, key: None = None, def
4646
4645
  With a single iterable argument, return its biggest item. The
4647
4646
  default keyword-only argument specifies an object to return if
4648
4647
  the provided iterable is empty.
4649
- With two or more arguments, return the largest argument.
4648
+ With two or more positional arguments, return the largest argument.
4650
4649
  """
4651
4650
  ...
4652
4651
  @overload
@@ -4658,7 +4657,7 @@ def max(iterable: Iterable[_T1], /, *, key: Callable[[_T1], SupportsRichComparis
4658
4657
  With a single iterable argument, return its biggest item. The
4659
4658
  default keyword-only argument specifies an object to return if
4660
4659
  the provided iterable is empty.
4661
- With two or more arguments, return the largest argument.
4660
+ With two or more positional arguments, return the largest argument.
4662
4661
  """
4663
4662
  ...
4664
4663
  @overload
@@ -4672,7 +4671,7 @@ def min(
4672
4671
  With a single iterable argument, return its smallest item. The
4673
4672
  default keyword-only argument specifies an object to return if
4674
4673
  the provided iterable is empty.
4675
- With two or more arguments, return the smallest argument.
4674
+ With two or more positional arguments, return the smallest argument.
4676
4675
  """
4677
4676
  ...
4678
4677
  @overload
@@ -4684,7 +4683,7 @@ def min(arg1: _T, arg2: _T, /, *_args: _T, key: Callable[[_T], SupportsRichCompa
4684
4683
  With a single iterable argument, return its smallest item. The
4685
4684
  default keyword-only argument specifies an object to return if
4686
4685
  the provided iterable is empty.
4687
- With two or more arguments, return the smallest argument.
4686
+ With two or more positional arguments, return the smallest argument.
4688
4687
  """
4689
4688
  ...
4690
4689
  @overload
@@ -4696,7 +4695,7 @@ def min(iterable: Iterable[SupportsRichComparisonT], /, *, key: None = None) ->
4696
4695
  With a single iterable argument, return its smallest item. The
4697
4696
  default keyword-only argument specifies an object to return if
4698
4697
  the provided iterable is empty.
4699
- With two or more arguments, return the smallest argument.
4698
+ With two or more positional arguments, return the smallest argument.
4700
4699
  """
4701
4700
  ...
4702
4701
  @overload
@@ -4708,7 +4707,7 @@ def min(iterable: Iterable[_T], /, *, key: Callable[[_T], SupportsRichComparison
4708
4707
  With a single iterable argument, return its smallest item. The
4709
4708
  default keyword-only argument specifies an object to return if
4710
4709
  the provided iterable is empty.
4711
- With two or more arguments, return the smallest argument.
4710
+ With two or more positional arguments, return the smallest argument.
4712
4711
  """
4713
4712
  ...
4714
4713
  @overload
@@ -4720,7 +4719,7 @@ def min(iterable: Iterable[SupportsRichComparisonT], /, *, key: None = None, def
4720
4719
  With a single iterable argument, return its smallest item. The
4721
4720
  default keyword-only argument specifies an object to return if
4722
4721
  the provided iterable is empty.
4723
- With two or more arguments, return the smallest argument.
4722
+ With two or more positional arguments, return the smallest argument.
4724
4723
  """
4725
4724
  ...
4726
4725
  @overload
@@ -4732,25 +4731,25 @@ def min(iterable: Iterable[_T1], /, *, key: Callable[[_T1], SupportsRichComparis
4732
4731
  With a single iterable argument, return its smallest item. The
4733
4732
  default keyword-only argument specifies an object to return if
4734
4733
  the provided iterable is empty.
4735
- With two or more arguments, return the smallest argument.
4734
+ With two or more positional arguments, return the smallest argument.
4736
4735
  """
4737
4736
  ...
4738
4737
  @overload
4739
4738
  def next(i: SupportsNext[_T], /) -> _T:
4740
4739
  """
4741
- Return the next item from the iterator.
4740
+ next(iterator[, default])
4742
4741
 
4743
- If default is given and the iterator is exhausted,
4744
- it is returned instead of raising StopIteration.
4742
+ Return the next item from the iterator. If default is given and the iterator
4743
+ is exhausted, it is returned instead of raising StopIteration.
4745
4744
  """
4746
4745
  ...
4747
4746
  @overload
4748
4747
  def next(i: SupportsNext[_T], default: _VT, /) -> _T | _VT:
4749
4748
  """
4750
- Return the next item from the iterator.
4749
+ next(iterator[, default])
4751
4750
 
4752
- If default is given and the iterator is exhausted,
4753
- it is returned instead of raising StopIteration.
4751
+ Return the next item from the iterator. If default is given and the iterator
4752
+ is exhausted, it is returned instead of raising StopIteration.
4754
4753
  """
4755
4754
  ...
4756
4755
  def oct(number: int | SupportsIndex, /) -> str:
@@ -5999,7 +5998,7 @@ def sum(iterable: Iterable[_AddableT1], /, start: _AddableT2) -> _AddableT1 | _A
5999
5998
  @overload
6000
5999
  def vars(object: type, /) -> types.MappingProxyType[str, Any]:
6001
6000
  """
6002
- Show vars.
6001
+ vars([object]) -> dictionary
6003
6002
 
6004
6003
  Without arguments, equivalent to locals().
6005
6004
  With an argument, equivalent to object.__dict__.
@@ -6008,7 +6007,7 @@ def vars(object: type, /) -> types.MappingProxyType[str, Any]:
6008
6007
  @overload
6009
6008
  def vars(object: Any = ..., /) -> dict[str, Any]:
6010
6009
  """
6011
- Show vars.
6010
+ vars([object]) -> dictionary
6012
6011
 
6013
6012
  Without arguments, equivalent to locals().
6014
6013
  With an argument, equivalent to object.__dict__.
@@ -6017,11 +6016,6 @@ def vars(object: Any = ..., /) -> dict[str, Any]:
6017
6016
 
6018
6017
  class zip(Iterator[_T_co]):
6019
6018
  """
6020
- zip(*iterables, strict=False) --> Yield tuples until an input is exhausted.
6021
-
6022
- >>> list(zip('abcdefg', range(3), range(4)))
6023
- [('a', 0, 0), ('b', 1, 1), ('c', 2, 2)]
6024
-
6025
6019
  The zip object yields n-length tuples, where n is the number of iterables
6026
6020
  passed as positional arguments to zip(). The i-th element in every tuple
6027
6021
  comes from the i-th iterable argument to zip(). This continues until the
@@ -6029,6 +6023,9 @@ class zip(Iterator[_T_co]):
6029
6023
 
6030
6024
  If strict is true and one of the arguments is exhausted before the others,
6031
6025
  raise a ValueError.
6026
+
6027
+ >>> list(zip('abcdefg', range(3), range(4)))
6028
+ [('a', 0, 0), ('b', 1, 1), ('c', 2, 2)]
6032
6029
  """
6033
6030
  if sys.version_info >= (3, 10):
6034
6031
  @overload
@@ -6537,4 +6534,6 @@ if sys.version_info >= (3, 11):
6537
6534
  ) -> tuple[ExceptionGroup[_ExceptionT_co] | None, ExceptionGroup[_ExceptionT_co] | None]: ...
6538
6535
 
6539
6536
  if sys.version_info >= (3, 13):
6540
- class PythonFinalizationError(RuntimeError): ...
6537
+ class PythonFinalizationError(RuntimeError):
6538
+ """Operation blocked during Python finalization."""
6539
+ ...