basedpyright 1.15.2 → 1.16.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 (46) 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/_bisect.pyi +16 -8
  6. package/dist/typeshed-fallback/stdlib/_csv.pyi +13 -4
  7. package/dist/typeshed-fallback/stdlib/_curses.pyi +1 -1
  8. package/dist/typeshed-fallback/stdlib/_decimal.pyi +19 -1
  9. package/dist/typeshed-fallback/stdlib/_imp.pyi +1 -1
  10. package/dist/typeshed-fallback/stdlib/_locale.pyi +11 -28
  11. package/dist/typeshed-fallback/stdlib/_lsprof.pyi +2 -0
  12. package/dist/typeshed-fallback/stdlib/_operator.pyi +1 -1
  13. package/dist/typeshed-fallback/stdlib/_posixsubprocess.pyi +10 -8
  14. package/dist/typeshed-fallback/stdlib/_socket.pyi +3 -15
  15. package/dist/typeshed-fallback/stdlib/_thread.pyi +6 -2
  16. package/dist/typeshed-fallback/stdlib/_warnings.pyi +2 -2
  17. package/dist/typeshed-fallback/stdlib/_weakref.pyi +9 -10
  18. package/dist/typeshed-fallback/stdlib/array.pyi +1 -1
  19. package/dist/typeshed-fallback/stdlib/atexit.pyi +4 -1
  20. package/dist/typeshed-fallback/stdlib/builtins.pyi +214 -203
  21. package/dist/typeshed-fallback/stdlib/cmath.pyi +1 -1
  22. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +15 -12
  23. package/dist/typeshed-fallback/stdlib/datetime.pyi +3 -3
  24. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +8 -12
  25. package/dist/typeshed-fallback/stdlib/functools.pyi +18 -13
  26. package/dist/typeshed-fallback/stdlib/gc.pyi +1 -0
  27. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +6 -5
  28. package/dist/typeshed-fallback/stdlib/io.pyi +48 -42
  29. package/dist/typeshed-fallback/stdlib/ipaddress.pyi +2 -2
  30. package/dist/typeshed-fallback/stdlib/itertools.pyi +6 -4
  31. package/dist/typeshed-fallback/stdlib/math.pyi +17 -5
  32. package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +1 -1
  33. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +22 -14
  34. package/dist/typeshed-fallback/stdlib/readline.pyi +29 -83
  35. package/dist/typeshed-fallback/stdlib/signal.pyi +4 -4
  36. package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +65 -55
  37. package/dist/typeshed-fallback/stdlib/ssl.pyi +1 -1
  38. package/dist/typeshed-fallback/stdlib/struct.pyi +1 -8
  39. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +7 -5
  40. package/dist/typeshed-fallback/stdlib/termios.pyi +14 -23
  41. package/dist/typeshed-fallback/stdlib/time.pyi +2 -2
  42. package/dist/typeshed-fallback/stdlib/types.pyi +49 -25
  43. package/dist/typeshed-fallback/stdlib/typing.pyi +25 -225
  44. package/dist/typeshed-fallback/stdlib/unicodedata.pyi +2 -2
  45. package/dist/typeshed-fallback/stdlib/zlib.pyi +1 -1
  46. package/package.json +2 -2
@@ -1,7 +1,14 @@
1
1
  """
2
- Built-in functions, exceptions, and other objects.
2
+ Built-in functions, types, exceptions, and other objects.
3
3
 
4
- Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.
4
+ This module provides direct access to all 'built-in'
5
+ identifiers of Python; for example, builtins.len is
6
+ the full name for the built-in function len().
7
+
8
+ This module is not normally accessed explicitly by most
9
+ applications, but can be useful in modules that provide
10
+ objects with the same name as a built-in value, but in
11
+ which the built-in of that name is also needed.
5
12
  """
6
13
 
7
14
  import _ast
@@ -148,7 +155,11 @@ class object:
148
155
  """Return hash(self)."""
149
156
  ...
150
157
  def __format__(self, format_spec: str, /) -> str:
151
- """Default object formatter."""
158
+ """
159
+ Default object formatter.
160
+
161
+ Return str(self) if format_spec is empty. Raise TypeError otherwise.
162
+ """
152
163
  ...
153
164
  def __getattribute__(self, name: str, /) -> Any:
154
165
  """Return getattr(self, name)."""
@@ -203,7 +214,7 @@ class staticmethod(Generic[_P, _R_co]):
203
214
 
204
215
  class C:
205
216
  @staticmethod
206
- def f(arg1, arg2, ...):
217
+ def f(arg1, arg2, argN):
207
218
  ...
208
219
 
209
220
  It can be called either on the class (e.g. C.f()) or on an instance
@@ -247,7 +258,7 @@ class classmethod(Generic[_T, _P, _R_co]):
247
258
 
248
259
  class C:
249
260
  @classmethod
250
- def f(cls, arg1, arg2, ...):
261
+ def f(cls, arg1, arg2, argN):
251
262
  ...
252
263
 
253
264
  It can be called either on the class (e.g. C.f()) or on an instance
@@ -279,9 +290,8 @@ class classmethod(Generic[_T, _P, _R_co]):
279
290
 
280
291
  class type:
281
292
  """
282
- type(object_or_name, bases, dict)
283
293
  type(object) -> the object's type
284
- type(name, bases, dict) -> a new type
294
+ type(name, bases, dict, **kwds) -> a new type
285
295
  """
286
296
  # object.__base__ is None. Otherwise, it would be a type.
287
297
  @property
@@ -400,10 +410,9 @@ class int:
400
410
  def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
401
411
  def as_integer_ratio(self) -> tuple[int, Literal[1]]:
402
412
  """
403
- Return integer ratio.
413
+ Return a pair of integers, whose ratio is equal to the original int.
404
414
 
405
- Return a pair of integers, whose ratio is exactly equal to the original int
406
- and with a positive denominator.
415
+ The ratio is in lowest terms and has a positive denominator.
407
416
 
408
417
  >>> (10).as_integer_ratio()
409
418
  (10, 1)
@@ -679,6 +688,7 @@ class int:
679
688
  def __round__(self, ndigits: SupportsIndex = ..., /) -> int:
680
689
  """
681
690
  Rounding an Integral returns itself.
691
+
682
692
  Rounding with an ndigits argument also returns an integer.
683
693
  """
684
694
  ...
@@ -714,7 +724,7 @@ class int:
714
724
  """Return hash(self)."""
715
725
  ...
716
726
  def __bool__(self) -> bool:
717
- """self != 0"""
727
+ """True if self else False"""
718
728
  ...
719
729
  def __index__(self) -> int:
720
730
  """Return self converted to an integer, if self is suitable for use as an index into a list."""
@@ -725,12 +735,10 @@ class float:
725
735
  def __new__(cls, x: ConvertibleToFloat = ..., /) -> Self: ...
726
736
  def as_integer_ratio(self) -> tuple[int, int]:
727
737
  """
728
- Return integer ratio.
738
+ Return a pair of integers, whose ratio is exactly equal to the original float.
729
739
 
730
- Return a pair of integers, whose ratio is exactly equal to the original float
731
- and with a positive denominator.
732
-
733
- Raise OverflowError on infinities and a ValueError on NaNs.
740
+ The ratio is in lowest terms and has a positive denominator. Raise
741
+ OverflowError on infinities and a ValueError on NaNs.
734
742
 
735
743
  >>> (10.0).as_integer_ratio()
736
744
  (10, 1)
@@ -905,14 +913,17 @@ class float:
905
913
  """Return hash(self)."""
906
914
  ...
907
915
  def __bool__(self) -> bool:
908
- """self != 0"""
916
+ """True if self else False"""
909
917
  ...
910
918
 
911
919
  class complex:
912
920
  """
913
- Create a complex number from a real part and an optional imaginary part.
921
+ Create a complex number from a string or numbers.
914
922
 
915
- This is equivalent to (real + imag*1j) where imag defaults to 0.
923
+ If a string is given, parse it as a complex number.
924
+ If a single number is given, convert it to a complex number.
925
+ If the 'real' or 'imag' arguments are given, create a complex number
926
+ with the specified real and imaginary components.
916
927
  """
917
928
  # Python doesn't currently accept SupportsComplex for the second argument
918
929
  @overload
@@ -932,11 +943,7 @@ class complex:
932
943
  """the imaginary part of a complex number"""
933
944
  ...
934
945
  def conjugate(self) -> complex:
935
- """
936
- complex.conjugate() -> complex
937
-
938
- Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.
939
- """
946
+ """Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j."""
940
947
  ...
941
948
  def __add__(self, value: complex, /) -> complex:
942
949
  """Return self+value."""
@@ -987,7 +994,7 @@ class complex:
987
994
  """Return hash(self)."""
988
995
  ...
989
996
  def __bool__(self) -> bool:
990
- """self != 0"""
997
+ """True if self else False"""
991
998
  ...
992
999
  if sys.version_info >= (3, 11):
993
1000
  def __complex__(self) -> complex:
@@ -1484,34 +1491,38 @@ class str(Sequence[str]):
1484
1491
  ...
1485
1492
  @overload
1486
1493
  def rsplit(self: LiteralString, sep: LiteralString | None = None, maxsplit: SupportsIndex = -1) -> list[LiteralString]:
1487
- """
1488
- Return a list of the words in the string, using sep as the delimiter string.
1494
+ r"""
1495
+ Return a list of the substrings in the string, using sep as the separator string.
1489
1496
 
1490
1497
  sep
1491
- The delimiter according which to split the string.
1492
- None (the default value) means split according to any whitespace,
1493
- and discard empty strings from the result.
1498
+ The separator used to split the string.
1499
+
1500
+ When set to None (the default value), will split on any whitespace
1501
+ character (including \n \r \t \f and spaces) and will discard
1502
+ empty strings from the result.
1494
1503
  maxsplit
1495
- Maximum number of splits to do.
1504
+ Maximum number of splits.
1496
1505
  -1 (the default value) means no limit.
1497
1506
 
1498
- Splits are done starting at the end of the string and working to the front.
1507
+ Splitting starts at the end of the string and works to the front.
1499
1508
  """
1500
1509
  ...
1501
1510
  @overload
1502
1511
  def rsplit(self, sep: str | None = None, maxsplit: SupportsIndex = -1) -> list[str]:
1503
- """
1504
- Return a list of the words in the string, using sep as the delimiter string.
1512
+ r"""
1513
+ Return a list of the substrings in the string, using sep as the separator string.
1505
1514
 
1506
1515
  sep
1507
- The delimiter according which to split the string.
1508
- None (the default value) means split according to any whitespace,
1509
- and discard empty strings from the result.
1516
+ The separator used to split the string.
1517
+
1518
+ When set to None (the default value), will split on any whitespace
1519
+ character (including \n \r \t \f and spaces) and will discard
1520
+ empty strings from the result.
1510
1521
  maxsplit
1511
- Maximum number of splits to do.
1522
+ Maximum number of splits.
1512
1523
  -1 (the default value) means no limit.
1513
1524
 
1514
- Splits are done starting at the end of the string and working to the front.
1525
+ Splitting starts at the end of the string and works to the front.
1515
1526
  """
1516
1527
  ...
1517
1528
  @overload
@@ -1532,30 +1543,46 @@ class str(Sequence[str]):
1532
1543
  ...
1533
1544
  @overload
1534
1545
  def split(self: LiteralString, sep: LiteralString | None = None, maxsplit: SupportsIndex = -1) -> list[LiteralString]:
1535
- """
1536
- Return a list of the words in the string, using sep as the delimiter string.
1546
+ r"""
1547
+ Return a list of the substrings in the string, using sep as the separator string.
1537
1548
 
1538
- sep
1539
- The delimiter according which to split the string.
1540
- None (the default value) means split according to any whitespace,
1541
- and discard empty strings from the result.
1542
- maxsplit
1543
- Maximum number of splits to do.
1544
- -1 (the default value) means no limit.
1549
+ sep
1550
+ The separator used to split the string.
1551
+
1552
+ When set to None (the default value), will split on any whitespace
1553
+ character (including \n \r \t \f and spaces) and will discard
1554
+ empty strings from the result.
1555
+ maxsplit
1556
+ Maximum number of splits.
1557
+ -1 (the default value) means no limit.
1558
+
1559
+ Splitting starts at the front of the string and works to the end.
1560
+
1561
+ Note, str.split() is mainly useful for data that has been intentionally
1562
+ delimited. With natural text that includes punctuation, consider using
1563
+ the regular expression module.
1545
1564
  """
1546
1565
  ...
1547
1566
  @overload
1548
1567
  def split(self, sep: str | None = None, maxsplit: SupportsIndex = -1) -> list[str]:
1549
- """
1550
- Return a list of the words in the string, using sep as the delimiter string.
1568
+ r"""
1569
+ Return a list of the substrings in the string, using sep as the separator string.
1551
1570
 
1552
- sep
1553
- The delimiter according which to split the string.
1554
- None (the default value) means split according to any whitespace,
1555
- and discard empty strings from the result.
1556
- maxsplit
1557
- Maximum number of splits to do.
1558
- -1 (the default value) means no limit.
1571
+ sep
1572
+ The separator used to split the string.
1573
+
1574
+ When set to None (the default value), will split on any whitespace
1575
+ character (including \n \r \t \f and spaces) and will discard
1576
+ empty strings from the result.
1577
+ maxsplit
1578
+ Maximum number of splits.
1579
+ -1 (the default value) means no limit.
1580
+
1581
+ Splitting starts at the front of the string and works to the end.
1582
+
1583
+ Note, str.split() is mainly useful for data that has been intentionally
1584
+ delimited. With natural text that includes punctuation, consider using
1585
+ the regular expression module.
1559
1586
  """
1560
1587
  ...
1561
1588
  @overload
@@ -1722,7 +1749,7 @@ class str(Sequence[str]):
1722
1749
  ...
1723
1750
  # Incompatible with Sequence.__contains__
1724
1751
  def __contains__(self, key: str, /) -> bool:
1725
- """Return key in self."""
1752
+ """Return bool(key in self)."""
1726
1753
  ...
1727
1754
  def __eq__(self, value: object, /) -> bool:
1728
1755
  """Return self==value."""
@@ -1883,7 +1910,7 @@ class bytes(Sequence[int]):
1883
1910
  ...
1884
1911
  def hex(self, sep: str | bytes = ..., bytes_per_sep: SupportsIndex = ...) -> str:
1885
1912
  r"""
1886
- Create a str of hexadecimal numbers from a bytes object.
1913
+ Create a string of hexadecimal numbers from a bytes object.
1887
1914
 
1888
1915
  sep
1889
1916
  An optional single character or byte to separate hex bytes.
@@ -2260,7 +2287,7 @@ class bytes(Sequence[int]):
2260
2287
  ...
2261
2288
  # Incompatible with Sequence.__contains__
2262
2289
  def __contains__(self, key: SupportsIndex | ReadableBuffer, /) -> bool:
2263
- """Return key in self."""
2290
+ """Return bool(key in self)."""
2264
2291
  ...
2265
2292
  def __eq__(self, value: object, /) -> bool:
2266
2293
  """Return self==value."""
@@ -2408,7 +2435,7 @@ class bytearray(MutableSequence[int]):
2408
2435
  ...
2409
2436
  def hex(self, sep: str | bytes = ..., bytes_per_sep: SupportsIndex = ...) -> str:
2410
2437
  """
2411
- Create a str of hexadecimal numbers from a bytearray object.
2438
+ Create a string of hexadecimal numbers from a bytearray object.
2412
2439
 
2413
2440
  sep
2414
2441
  An optional single character or byte to separate hex bytes.
@@ -2830,7 +2857,7 @@ class bytearray(MutableSequence[int]):
2830
2857
  ...
2831
2858
  # Incompatible with Sequence.__contains__
2832
2859
  def __contains__(self, key: SupportsIndex | ReadableBuffer, /) -> bool:
2833
- """Return key in self."""
2860
+ """Return bool(key in self)."""
2834
2861
  ...
2835
2862
  def __eq__(self, value: object, /) -> bool:
2836
2863
  """Return self==value."""
@@ -3158,7 +3185,7 @@ class tuple(Sequence[_T_co]):
3158
3185
  """Return len(self)."""
3159
3186
  ...
3160
3187
  def __contains__(self, key: object, /) -> bool:
3161
- """Return key in self."""
3188
+ """Return bool(key in self)."""
3162
3189
  ...
3163
3190
  @overload
3164
3191
  def __getitem__(self, key: SupportsIndex, /) -> _T_co:
@@ -3335,11 +3362,11 @@ class list(MutableSequence[_T]):
3335
3362
  __hash__: ClassVar[None] # type: ignore[assignment]
3336
3363
  @overload
3337
3364
  def __getitem__(self, i: SupportsIndex, /) -> _T:
3338
- """x.__getitem__(y) <==> x[y]"""
3365
+ """Return self[index]."""
3339
3366
  ...
3340
3367
  @overload
3341
3368
  def __getitem__(self, s: slice, /) -> list[_T]:
3342
- """x.__getitem__(y) <==> x[y]"""
3369
+ """Return self[index]."""
3343
3370
  ...
3344
3371
  @overload
3345
3372
  def __setitem__(self, key: SupportsIndex, value: _T, /) -> None:
@@ -3374,7 +3401,7 @@ class list(MutableSequence[_T]):
3374
3401
  """Implement self*=value."""
3375
3402
  ...
3376
3403
  def __contains__(self, key: object, /) -> bool:
3377
- """Return key in self."""
3404
+ """Return bool(key in self)."""
3378
3405
  ...
3379
3406
  def __reversed__(self) -> Iterator[_T]:
3380
3407
  """Return a reverse iterator over the list."""
@@ -3484,28 +3511,34 @@ class dict(MutableMapping[_KT, _VT]):
3484
3511
  def pop(self, key: _KT, /) -> _VT:
3485
3512
  """
3486
3513
  D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
3487
- If key is not found, d is returned if given, otherwise KeyError is raised
3514
+
3515
+ If the key is not found, return the default if given; otherwise,
3516
+ raise a KeyError.
3488
3517
  """
3489
3518
  ...
3490
3519
  @overload
3491
3520
  def pop(self, key: _KT, default: _VT, /) -> _VT:
3492
3521
  """
3493
3522
  D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
3494
- If key is not found, d is returned if given, otherwise KeyError is raised
3523
+
3524
+ If the key is not found, return the default if given; otherwise,
3525
+ raise a KeyError.
3495
3526
  """
3496
3527
  ...
3497
3528
  @overload
3498
3529
  def pop(self, key: _KT, default: _T, /) -> _VT | _T:
3499
3530
  """
3500
3531
  D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
3501
- If key is not found, d is returned if given, otherwise KeyError is raised
3532
+
3533
+ If the key is not found, return the default if given; otherwise,
3534
+ raise a KeyError.
3502
3535
  """
3503
3536
  ...
3504
3537
  def __len__(self) -> int:
3505
3538
  """Return len(self)."""
3506
3539
  ...
3507
3540
  def __getitem__(self, key: _KT, /) -> _VT:
3508
- """x.__getitem__(y) <==> x[y]"""
3541
+ """Return self[key]."""
3509
3542
  ...
3510
3543
  def __setitem__(self, key: _KT, value: _VT, /) -> None:
3511
3544
  """Set self[key] to value."""
@@ -3588,7 +3621,8 @@ class set(MutableSet[_T]):
3588
3621
  """
3589
3622
  Remove an element from a set if it is a member.
3590
3623
 
3591
- If the element is not a member, do nothing.
3624
+ Unlike set.remove(), the discard() method does not raise
3625
+ an exception when an element is missing from the set.
3592
3626
  """
3593
3627
  ...
3594
3628
  def intersection(self, *s: Iterable[Any]) -> set[_T]:
@@ -3605,10 +3639,10 @@ class set(MutableSet[_T]):
3605
3639
  """Return True if two sets have a null intersection."""
3606
3640
  ...
3607
3641
  def issubset(self, s: Iterable[Any], /) -> bool:
3608
- """Report whether another set contains this set."""
3642
+ """Test whether every element in the set is in other."""
3609
3643
  ...
3610
3644
  def issuperset(self, s: Iterable[Any], /) -> bool:
3611
- """Report whether this set contains another set."""
3645
+ """Test whether every element in other is in the set."""
3612
3646
  ...
3613
3647
  def remove(self, element: _T, /) -> None:
3614
3648
  """
@@ -3723,10 +3757,10 @@ class frozenset(AbstractSet[_T_co]):
3723
3757
  """Return True if two sets have a null intersection."""
3724
3758
  ...
3725
3759
  def issubset(self, s: Iterable[object], /) -> bool:
3726
- """Report whether another set contains this set."""
3760
+ """Test whether every element in the set is in other."""
3727
3761
  ...
3728
3762
  def issuperset(self, s: Iterable[object], /) -> bool:
3729
- """Report whether this set contains another set."""
3763
+ """Test whether every element in other is in the set."""
3730
3764
  ...
3731
3765
  def symmetric_difference(self, s: Iterable[_T_co], /) -> frozenset[_T_co]:
3732
3766
  """
@@ -3852,7 +3886,7 @@ class range(Sequence[int]):
3852
3886
  """Return hash(self)."""
3853
3887
  ...
3854
3888
  def __contains__(self, key: object, /) -> bool:
3855
- """Return key in self."""
3889
+ """Return bool(key in self)."""
3856
3890
  ...
3857
3891
  def __iter__(self) -> Iterator[int]:
3858
3892
  """Implement iter(self)."""
@@ -3919,13 +3953,13 @@ class property:
3919
3953
  doc: str | None = ...,
3920
3954
  ) -> None: ...
3921
3955
  def getter(self, fget: Callable[[Any], Any], /) -> property:
3922
- """Descriptor to change the getter on a property."""
3956
+ """Descriptor to obtain a copy of the property with a different getter."""
3923
3957
  ...
3924
3958
  def setter(self, fset: Callable[[Any, Any], None], /) -> property:
3925
- """Descriptor to change the setter on a property."""
3959
+ """Descriptor to obtain a copy of the property with a different setter."""
3926
3960
  ...
3927
3961
  def deleter(self, fdel: Callable[[Any], None], /) -> property:
3928
- """Descriptor to change the deleter on a property."""
3962
+ """Descriptor to obtain a copy of the property with a different deleter."""
3929
3963
  ...
3930
3964
  def __get__(self, instance: Any, owner: type | None = None, /) -> Any:
3931
3965
  """Return an attribute of instance, which is of type owner."""
@@ -4020,11 +4054,21 @@ if sys.version_info >= (3, 10):
4020
4054
  # `anext` is just a passthrough for `obj.__anext__`
4021
4055
  # 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
4022
4056
  def anext(i: _SupportsSynchronousAnext[_AwaitableT], /) -> _AwaitableT:
4023
- """Return the next item from the async iterator."""
4057
+ """
4058
+ async anext(aiterator[, default])
4059
+
4060
+ Return the next item from the async iterator. If default is given and the async
4061
+ iterator is exhausted, it is returned instead of raising StopAsyncIteration.
4062
+ """
4024
4063
  ...
4025
4064
  @overload
4026
4065
  async def anext(i: SupportsAnext[_T], default: _VT, /) -> _T | _VT:
4027
- """Return the next item from the async iterator."""
4066
+ """
4067
+ async anext(aiterator[, default])
4068
+
4069
+ Return the next item from the async iterator. If default is given and the async
4070
+ iterator is exhausted, it is returned instead of raising StopAsyncIteration.
4071
+ """
4028
4072
  ...
4029
4073
 
4030
4074
  # compile() returns a CodeType, unless the flags argument includes PyCF_ONLY_AST (=1024),
@@ -4139,12 +4183,12 @@ def delattr(obj: object, name: str, /) -> None:
4139
4183
  """
4140
4184
  Deletes the named attribute from the given object.
4141
4185
 
4142
- delattr(x, 'y') is equivalent to ``del x.y''
4186
+ delattr(x, 'y') is equivalent to ``del x.y``
4143
4187
  """
4144
4188
  ...
4145
4189
  def dir(o: object = ..., /) -> list[str]:
4146
4190
  """
4147
- dir([object]) -> list of strings
4191
+ Show attributes of an object.
4148
4192
 
4149
4193
  If called without an argument, return the names in the current scope.
4150
4194
  Else, return an alphabetized list of names comprising (some of) the attributes
@@ -4272,19 +4316,22 @@ class filter(Iterator[_T]):
4272
4316
 
4273
4317
  def format(value: object, format_spec: str = "", /) -> str:
4274
4318
  """
4275
- Return value.__format__(format_spec)
4319
+ Return type(value).__format__(value, format_spec)
4320
+
4321
+ Many built-in types implement format_spec according to the
4322
+ Format Specification Mini-language. See help('FORMATTING').
4276
4323
 
4277
- format_spec defaults to the empty string.
4278
- See the Format Specification Mini-Language section of help('FORMATTING') for
4279
- details.
4324
+ If type(value) does not supply a method named __format__
4325
+ and format_spec is empty, then str(value) is returned.
4326
+ See also help('SPECIALMETHODS').
4280
4327
  """
4281
4328
  ...
4282
4329
  @overload
4283
4330
  def getattr(o: object, name: str, /) -> Any:
4284
4331
  """
4285
- getattr(object, name[, default]) -> value
4332
+ Get a named attribute from an object.
4286
4333
 
4287
- Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4334
+ getattr(x, 'y') is equivalent to x.y
4288
4335
  When a default argument is given, it is returned when the attribute doesn't
4289
4336
  exist; without it, an exception is raised in that case.
4290
4337
  """
@@ -4296,9 +4343,9 @@ def getattr(o: object, name: str, /) -> Any:
4296
4343
  @overload
4297
4344
  def getattr(o: object, name: str, default: None, /) -> Any | None:
4298
4345
  """
4299
- getattr(object, name[, default]) -> value
4346
+ Get a named attribute from an object.
4300
4347
 
4301
- Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4348
+ getattr(x, 'y') is equivalent to x.y
4302
4349
  When a default argument is given, it is returned when the attribute doesn't
4303
4350
  exist; without it, an exception is raised in that case.
4304
4351
  """
@@ -4306,9 +4353,9 @@ def getattr(o: object, name: str, default: None, /) -> Any | None:
4306
4353
  @overload
4307
4354
  def getattr(o: object, name: str, default: bool, /) -> Any | bool:
4308
4355
  """
4309
- getattr(object, name[, default]) -> value
4356
+ Get a named attribute from an object.
4310
4357
 
4311
- Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4358
+ getattr(x, 'y') is equivalent to x.y
4312
4359
  When a default argument is given, it is returned when the attribute doesn't
4313
4360
  exist; without it, an exception is raised in that case.
4314
4361
  """
@@ -4316,9 +4363,9 @@ def getattr(o: object, name: str, default: bool, /) -> Any | bool:
4316
4363
  @overload
4317
4364
  def getattr(o: object, name: str, default: list[Any], /) -> Any | list[Any]:
4318
4365
  """
4319
- getattr(object, name[, default]) -> value
4366
+ Get a named attribute from an object.
4320
4367
 
4321
- Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4368
+ getattr(x, 'y') is equivalent to x.y
4322
4369
  When a default argument is given, it is returned when the attribute doesn't
4323
4370
  exist; without it, an exception is raised in that case.
4324
4371
  """
@@ -4326,9 +4373,9 @@ def getattr(o: object, name: str, default: list[Any], /) -> Any | list[Any]:
4326
4373
  @overload
4327
4374
  def getattr(o: object, name: str, default: dict[Any, Any], /) -> Any | dict[Any, Any]:
4328
4375
  """
4329
- getattr(object, name[, default]) -> value
4376
+ Get a named attribute from an object.
4330
4377
 
4331
- Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4378
+ getattr(x, 'y') is equivalent to x.y
4332
4379
  When a default argument is given, it is returned when the attribute doesn't
4333
4380
  exist; without it, an exception is raised in that case.
4334
4381
  """
@@ -4336,9 +4383,9 @@ def getattr(o: object, name: str, default: dict[Any, Any], /) -> Any | dict[Any,
4336
4383
  @overload
4337
4384
  def getattr(o: object, name: str, default: _T, /) -> Any | _T:
4338
4385
  """
4339
- getattr(object, name[, default]) -> value
4386
+ Get a named attribute from an object.
4340
4387
 
4341
- Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
4388
+ getattr(x, 'y') is equivalent to x.y
4342
4389
  When a default argument is given, it is returned when the attribute doesn't
4343
4390
  exist; without it, an exception is raised in that case.
4344
4391
  """
@@ -4401,44 +4448,36 @@ class _GetItemIterable(Protocol[_T_co]):
4401
4448
  @overload
4402
4449
  def iter(object: SupportsIter[_SupportsNextT], /) -> _SupportsNextT:
4403
4450
  """
4404
- iter(iterable) -> iterator
4405
- iter(callable, sentinel) -> iterator
4451
+ Get an iterator from an object.
4406
4452
 
4407
- Get an iterator from an object. In the first form, the argument must
4408
- supply its own iterator, or be a sequence.
4453
+ In the first form, the argument must supply its own iterator, or be a sequence.
4409
4454
  In the second form, the callable is called until it returns the sentinel.
4410
4455
  """
4411
4456
  ...
4412
4457
  @overload
4413
4458
  def iter(object: _GetItemIterable[_T], /) -> Iterator[_T]:
4414
4459
  """
4415
- iter(iterable) -> iterator
4416
- iter(callable, sentinel) -> iterator
4460
+ Get an iterator from an object.
4417
4461
 
4418
- Get an iterator from an object. In the first form, the argument must
4419
- supply its own iterator, or be a sequence.
4462
+ In the first form, the argument must supply its own iterator, or be a sequence.
4420
4463
  In the second form, the callable is called until it returns the sentinel.
4421
4464
  """
4422
4465
  ...
4423
4466
  @overload
4424
4467
  def iter(object: Callable[[], _T | None], sentinel: None, /) -> Iterator[_T]:
4425
4468
  """
4426
- iter(iterable) -> iterator
4427
- iter(callable, sentinel) -> iterator
4469
+ Get an iterator from an object.
4428
4470
 
4429
- Get an iterator from an object. In the first form, the argument must
4430
- supply its own iterator, or be a sequence.
4471
+ In the first form, the argument must supply its own iterator, or be a sequence.
4431
4472
  In the second form, the callable is called until it returns the sentinel.
4432
4473
  """
4433
4474
  ...
4434
4475
  @overload
4435
4476
  def iter(object: Callable[[], _T], sentinel: object, /) -> Iterator[_T]:
4436
4477
  """
4437
- iter(iterable) -> iterator
4438
- iter(callable, sentinel) -> iterator
4478
+ Get an iterator from an object.
4439
4479
 
4440
- Get an iterator from an object. In the first form, the argument must
4441
- supply its own iterator, or be a sequence.
4480
+ In the first form, the argument must supply its own iterator, or be a sequence.
4442
4481
  In the second form, the callable is called until it returns the sentinel.
4443
4482
  """
4444
4483
  ...
@@ -4460,11 +4499,11 @@ def isinstance(obj: object, class_or_tuple: _ClassInfo, /) -> bool:
4460
4499
  ...
4461
4500
  def issubclass(cls: type, class_or_tuple: _ClassInfo, /) -> bool:
4462
4501
  """
4463
- Return whether 'cls' is a derived from another class or is the same class.
4502
+ Return whether 'cls' is derived from another class or is the same class.
4464
4503
 
4465
4504
  A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to
4466
4505
  check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)
4467
- or ...`` etc.
4506
+ or ...``.
4468
4507
  """
4469
4508
  ...
4470
4509
  def len(obj: Sized, /) -> int:
@@ -4688,19 +4727,19 @@ def min(iterable: Iterable[_T1], /, *, key: Callable[[_T1], SupportsRichComparis
4688
4727
  @overload
4689
4728
  def next(i: SupportsNext[_T], /) -> _T:
4690
4729
  """
4691
- next(iterator[, default])
4730
+ Return the next item from the iterator.
4692
4731
 
4693
- Return the next item from the iterator. If default is given and the iterator
4694
- is exhausted, it is returned instead of raising StopIteration.
4732
+ If default is given and the iterator is exhausted,
4733
+ it is returned instead of raising StopIteration.
4695
4734
  """
4696
4735
  ...
4697
4736
  @overload
4698
4737
  def next(i: SupportsNext[_T], default: _VT, /) -> _T | _VT:
4699
4738
  """
4700
- next(iterator[, default])
4739
+ Return the next item from the iterator.
4701
4740
 
4702
- Return the next item from the iterator. If default is given and the iterator
4703
- is exhausted, it is returned instead of raising StopIteration.
4741
+ If default is given and the iterator is exhausted,
4742
+ it is returned instead of raising StopIteration.
4704
4743
  """
4705
4744
  ...
4706
4745
  def oct(number: int | SupportsIndex, /) -> str:
@@ -4742,9 +4781,9 @@ def open(
4742
4781
  'a' for appending (which on some Unix systems, means that all writes
4743
4782
  append to the end of the file regardless of the current seek position).
4744
4783
  In text mode, if encoding is not specified the encoding used is platform
4745
- dependent: locale.getpreferredencoding(False) is called to get the
4746
- current locale encoding. (For reading and writing raw bytes use binary
4747
- mode and leave encoding unspecified.) The available modes are:
4784
+ dependent: locale.getencoding() is called to get the current locale encoding.
4785
+ (For reading and writing raw bytes use binary mode and leave encoding
4786
+ unspecified.) The available modes are:
4748
4787
 
4749
4788
  ========= ===============================================================
4750
4789
  Character Meaning
@@ -4756,7 +4795,6 @@ def open(
4756
4795
  'b' binary mode
4757
4796
  't' text mode (default)
4758
4797
  '+' open a disk file for updating (reading and writing)
4759
- 'U' universal newline mode (deprecated)
4760
4798
  ========= ===============================================================
4761
4799
 
4762
4800
  The default mode is 'rt' (open for reading text). For binary random
@@ -4772,10 +4810,6 @@ def open(
4772
4810
  returned as strings, the bytes having been first decoded using a
4773
4811
  platform-dependent encoding or using the specified encoding if given.
4774
4812
 
4775
- 'U' mode is deprecated and will raise an exception in future versions
4776
- of Python. It has no effect in Python 3. Use newline to control
4777
- universal newlines mode.
4778
-
4779
4813
  buffering is an optional integer used to set the buffering policy.
4780
4814
  Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
4781
4815
  line buffering (only usable in text mode), and an integer > 1 to indicate
@@ -4876,9 +4910,9 @@ def open(
4876
4910
  'a' for appending (which on some Unix systems, means that all writes
4877
4911
  append to the end of the file regardless of the current seek position).
4878
4912
  In text mode, if encoding is not specified the encoding used is platform
4879
- dependent: locale.getpreferredencoding(False) is called to get the
4880
- current locale encoding. (For reading and writing raw bytes use binary
4881
- mode and leave encoding unspecified.) The available modes are:
4913
+ dependent: locale.getencoding() is called to get the current locale encoding.
4914
+ (For reading and writing raw bytes use binary mode and leave encoding
4915
+ unspecified.) The available modes are:
4882
4916
 
4883
4917
  ========= ===============================================================
4884
4918
  Character Meaning
@@ -4890,7 +4924,6 @@ def open(
4890
4924
  'b' binary mode
4891
4925
  't' text mode (default)
4892
4926
  '+' open a disk file for updating (reading and writing)
4893
- 'U' universal newline mode (deprecated)
4894
4927
  ========= ===============================================================
4895
4928
 
4896
4929
  The default mode is 'rt' (open for reading text). For binary random
@@ -4906,10 +4939,6 @@ def open(
4906
4939
  returned as strings, the bytes having been first decoded using a
4907
4940
  platform-dependent encoding or using the specified encoding if given.
4908
4941
 
4909
- 'U' mode is deprecated and will raise an exception in future versions
4910
- of Python. It has no effect in Python 3. Use newline to control
4911
- universal newlines mode.
4912
-
4913
4942
  buffering is an optional integer used to set the buffering policy.
4914
4943
  Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
4915
4944
  line buffering (only usable in text mode), and an integer > 1 to indicate
@@ -5010,9 +5039,9 @@ def open(
5010
5039
  'a' for appending (which on some Unix systems, means that all writes
5011
5040
  append to the end of the file regardless of the current seek position).
5012
5041
  In text mode, if encoding is not specified the encoding used is platform
5013
- dependent: locale.getpreferredencoding(False) is called to get the
5014
- current locale encoding. (For reading and writing raw bytes use binary
5015
- mode and leave encoding unspecified.) The available modes are:
5042
+ dependent: locale.getencoding() is called to get the current locale encoding.
5043
+ (For reading and writing raw bytes use binary mode and leave encoding
5044
+ unspecified.) The available modes are:
5016
5045
 
5017
5046
  ========= ===============================================================
5018
5047
  Character Meaning
@@ -5024,7 +5053,6 @@ def open(
5024
5053
  'b' binary mode
5025
5054
  't' text mode (default)
5026
5055
  '+' open a disk file for updating (reading and writing)
5027
- 'U' universal newline mode (deprecated)
5028
5056
  ========= ===============================================================
5029
5057
 
5030
5058
  The default mode is 'rt' (open for reading text). For binary random
@@ -5040,10 +5068,6 @@ def open(
5040
5068
  returned as strings, the bytes having been first decoded using a
5041
5069
  platform-dependent encoding or using the specified encoding if given.
5042
5070
 
5043
- 'U' mode is deprecated and will raise an exception in future versions
5044
- of Python. It has no effect in Python 3. Use newline to control
5045
- universal newlines mode.
5046
-
5047
5071
  buffering is an optional integer used to set the buffering policy.
5048
5072
  Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
5049
5073
  line buffering (only usable in text mode), and an integer > 1 to indicate
@@ -5142,9 +5166,9 @@ def open(
5142
5166
  'a' for appending (which on some Unix systems, means that all writes
5143
5167
  append to the end of the file regardless of the current seek position).
5144
5168
  In text mode, if encoding is not specified the encoding used is platform
5145
- dependent: locale.getpreferredencoding(False) is called to get the
5146
- current locale encoding. (For reading and writing raw bytes use binary
5147
- mode and leave encoding unspecified.) The available modes are:
5169
+ dependent: locale.getencoding() is called to get the current locale encoding.
5170
+ (For reading and writing raw bytes use binary mode and leave encoding
5171
+ unspecified.) The available modes are:
5148
5172
 
5149
5173
  ========= ===============================================================
5150
5174
  Character Meaning
@@ -5156,7 +5180,6 @@ def open(
5156
5180
  'b' binary mode
5157
5181
  't' text mode (default)
5158
5182
  '+' open a disk file for updating (reading and writing)
5159
- 'U' universal newline mode (deprecated)
5160
5183
  ========= ===============================================================
5161
5184
 
5162
5185
  The default mode is 'rt' (open for reading text). For binary random
@@ -5172,10 +5195,6 @@ def open(
5172
5195
  returned as strings, the bytes having been first decoded using a
5173
5196
  platform-dependent encoding or using the specified encoding if given.
5174
5197
 
5175
- 'U' mode is deprecated and will raise an exception in future versions
5176
- of Python. It has no effect in Python 3. Use newline to control
5177
- universal newlines mode.
5178
-
5179
5198
  buffering is an optional integer used to set the buffering policy.
5180
5199
  Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
5181
5200
  line buffering (only usable in text mode), and an integer > 1 to indicate
@@ -5274,9 +5293,9 @@ def open(
5274
5293
  'a' for appending (which on some Unix systems, means that all writes
5275
5294
  append to the end of the file regardless of the current seek position).
5276
5295
  In text mode, if encoding is not specified the encoding used is platform
5277
- dependent: locale.getpreferredencoding(False) is called to get the
5278
- current locale encoding. (For reading and writing raw bytes use binary
5279
- mode and leave encoding unspecified.) The available modes are:
5296
+ dependent: locale.getencoding() is called to get the current locale encoding.
5297
+ (For reading and writing raw bytes use binary mode and leave encoding
5298
+ unspecified.) The available modes are:
5280
5299
 
5281
5300
  ========= ===============================================================
5282
5301
  Character Meaning
@@ -5288,7 +5307,6 @@ def open(
5288
5307
  'b' binary mode
5289
5308
  't' text mode (default)
5290
5309
  '+' open a disk file for updating (reading and writing)
5291
- 'U' universal newline mode (deprecated)
5292
5310
  ========= ===============================================================
5293
5311
 
5294
5312
  The default mode is 'rt' (open for reading text). For binary random
@@ -5304,10 +5322,6 @@ def open(
5304
5322
  returned as strings, the bytes having been first decoded using a
5305
5323
  platform-dependent encoding or using the specified encoding if given.
5306
5324
 
5307
- 'U' mode is deprecated and will raise an exception in future versions
5308
- of Python. It has no effect in Python 3. Use newline to control
5309
- universal newlines mode.
5310
-
5311
5325
  buffering is an optional integer used to set the buffering policy.
5312
5326
  Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
5313
5327
  line buffering (only usable in text mode), and an integer > 1 to indicate
@@ -5408,9 +5422,9 @@ def open(
5408
5422
  'a' for appending (which on some Unix systems, means that all writes
5409
5423
  append to the end of the file regardless of the current seek position).
5410
5424
  In text mode, if encoding is not specified the encoding used is platform
5411
- dependent: locale.getpreferredencoding(False) is called to get the
5412
- current locale encoding. (For reading and writing raw bytes use binary
5413
- mode and leave encoding unspecified.) The available modes are:
5425
+ dependent: locale.getencoding() is called to get the current locale encoding.
5426
+ (For reading and writing raw bytes use binary mode and leave encoding
5427
+ unspecified.) The available modes are:
5414
5428
 
5415
5429
  ========= ===============================================================
5416
5430
  Character Meaning
@@ -5422,7 +5436,6 @@ def open(
5422
5436
  'b' binary mode
5423
5437
  't' text mode (default)
5424
5438
  '+' open a disk file for updating (reading and writing)
5425
- 'U' universal newline mode (deprecated)
5426
5439
  ========= ===============================================================
5427
5440
 
5428
5441
  The default mode is 'rt' (open for reading text). For binary random
@@ -5438,10 +5451,6 @@ def open(
5438
5451
  returned as strings, the bytes having been first decoded using a
5439
5452
  platform-dependent encoding or using the specified encoding if given.
5440
5453
 
5441
- 'U' mode is deprecated and will raise an exception in future versions
5442
- of Python. It has no effect in Python 3. Use newline to control
5443
- universal newlines mode.
5444
-
5445
5454
  buffering is an optional integer used to set the buffering policy.
5446
5455
  Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
5447
5456
  line buffering (only usable in text mode), and an integer > 1 to indicate
@@ -5542,9 +5551,9 @@ def open(
5542
5551
  'a' for appending (which on some Unix systems, means that all writes
5543
5552
  append to the end of the file regardless of the current seek position).
5544
5553
  In text mode, if encoding is not specified the encoding used is platform
5545
- dependent: locale.getpreferredencoding(False) is called to get the
5546
- current locale encoding. (For reading and writing raw bytes use binary
5547
- mode and leave encoding unspecified.) The available modes are:
5554
+ dependent: locale.getencoding() is called to get the current locale encoding.
5555
+ (For reading and writing raw bytes use binary mode and leave encoding
5556
+ unspecified.) The available modes are:
5548
5557
 
5549
5558
  ========= ===============================================================
5550
5559
  Character Meaning
@@ -5556,7 +5565,6 @@ def open(
5556
5565
  'b' binary mode
5557
5566
  't' text mode (default)
5558
5567
  '+' open a disk file for updating (reading and writing)
5559
- 'U' universal newline mode (deprecated)
5560
5568
  ========= ===============================================================
5561
5569
 
5562
5570
  The default mode is 'rt' (open for reading text). For binary random
@@ -5572,10 +5580,6 @@ def open(
5572
5580
  returned as strings, the bytes having been first decoded using a
5573
5581
  platform-dependent encoding or using the specified encoding if given.
5574
5582
 
5575
- 'U' mode is deprecated and will raise an exception in future versions
5576
- of Python. It has no effect in Python 3. Use newline to control
5577
- universal newlines mode.
5578
-
5579
5583
  buffering is an optional integer used to set the buffering policy.
5580
5584
  Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
5581
5585
  line buffering (only usable in text mode), and an integer > 1 to indicate
@@ -5661,30 +5665,34 @@ def print(
5661
5665
  file: SupportsWrite[str] | None = None,
5662
5666
  flush: Literal[False] = False,
5663
5667
  ) -> None:
5664
- r"""
5665
- print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
5666
-
5668
+ """
5667
5669
  Prints the values to a stream, or to sys.stdout by default.
5668
- Optional keyword arguments:
5669
- file: a file-like object (stream); defaults to the current sys.stdout.
5670
- sep: string inserted between values, default a space.
5671
- end: string appended after the last value, default a newline.
5672
- flush: whether to forcibly flush the stream.
5670
+
5671
+ sep
5672
+ string inserted between values, default a space.
5673
+ end
5674
+ string appended after the last value, default a newline.
5675
+ file
5676
+ a file-like object (stream); defaults to the current sys.stdout.
5677
+ flush
5678
+ whether to forcibly flush the stream.
5673
5679
  """
5674
5680
  ...
5675
5681
  @overload
5676
5682
  def print(
5677
5683
  *values: object, sep: str | None = " ", end: str | None = "\n", file: _SupportsWriteAndFlush[str] | None = None, flush: bool
5678
5684
  ) -> None:
5679
- r"""
5680
- print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
5681
-
5685
+ """
5682
5686
  Prints the values to a stream, or to sys.stdout by default.
5683
- Optional keyword arguments:
5684
- file: a file-like object (stream); defaults to the current sys.stdout.
5685
- sep: string inserted between values, default a space.
5686
- end: string appended after the last value, default a newline.
5687
- flush: whether to forcibly flush the stream.
5687
+
5688
+ sep
5689
+ string inserted between values, default a space.
5690
+ end
5691
+ string appended after the last value, default a newline.
5692
+ file
5693
+ a file-like object (stream); defaults to the current sys.stdout.
5694
+ flush
5695
+ whether to forcibly flush the stream.
5688
5696
  """
5689
5697
  ...
5690
5698
 
@@ -5909,7 +5917,7 @@ def setattr(obj: object, name: str, value: Any, /) -> None:
5909
5917
  """
5910
5918
  Sets the named attribute on the given object to the specified value.
5911
5919
 
5912
- setattr(x, 'y', v) is equivalent to ``x.y = v''
5920
+ setattr(x, 'y', v) is equivalent to ``x.y = v``
5913
5921
  """
5914
5922
  ...
5915
5923
  @overload
@@ -5980,7 +5988,7 @@ def sum(iterable: Iterable[_AddableT1], /, start: _AddableT2) -> _AddableT1 | _A
5980
5988
  @overload
5981
5989
  def vars(object: type, /) -> types.MappingProxyType[str, Any]:
5982
5990
  """
5983
- vars([object]) -> dictionary
5991
+ Show vars.
5984
5992
 
5985
5993
  Without arguments, equivalent to locals().
5986
5994
  With an argument, equivalent to object.__dict__.
@@ -5989,7 +5997,7 @@ def vars(object: type, /) -> types.MappingProxyType[str, Any]:
5989
5997
  @overload
5990
5998
  def vars(object: Any = ..., /) -> dict[str, Any]:
5991
5999
  """
5992
- vars([object]) -> dictionary
6000
+ Show vars.
5993
6001
 
5994
6002
  Without arguments, equivalent to locals().
5995
6003
  With an argument, equivalent to object.__dict__.
@@ -5998,7 +6006,7 @@ def vars(object: Any = ..., /) -> dict[str, Any]:
5998
6006
 
5999
6007
  class zip(Iterator[_T_co]):
6000
6008
  """
6001
- zip(*iterables) --> A zip object yielding tuples until an input is exhausted.
6009
+ zip(*iterables, strict=False) --> Yield tuples until an input is exhausted.
6002
6010
 
6003
6011
  >>> list(zip('abcdefg', range(3), range(4)))
6004
6012
  [('a', 0, 0), ('b', 1, 1), ('c', 2, 2)]
@@ -6007,6 +6015,9 @@ class zip(Iterator[_T_co]):
6007
6015
  passed as positional arguments to zip(). The i-th element in every tuple
6008
6016
  comes from the i-th iterable argument to zip(). This continues until the
6009
6017
  shortest argument is exhausted.
6018
+
6019
+ If strict is true and one of the arguments is exhausted before the others,
6020
+ raise a ValueError.
6010
6021
  """
6011
6022
  if sys.version_info >= (3, 10):
6012
6023
  @overload
@@ -6095,16 +6106,16 @@ def __import__(
6095
6106
  level: int = 0,
6096
6107
  ) -> types.ModuleType:
6097
6108
  """
6098
- __import__(name, globals=None, locals=None, fromlist=(), level=0) -> module
6109
+ Import a module.
6099
6110
 
6100
- Import a module. Because this function is meant for use by the Python
6111
+ Because this function is meant for use by the Python
6101
6112
  interpreter and not for general use, it is better to use
6102
6113
  importlib.import_module() to programmatically import a module.
6103
6114
 
6104
6115
  The globals argument is only used to determine the context;
6105
6116
  they are not modified. The locals argument is unused. The fromlist
6106
- should be a list of names to emulate ``from name import ...'', or an
6107
- empty list to emulate ``import name''.
6117
+ should be a list of names to emulate ``from name import ...``, or an
6118
+ empty list to emulate ``import name``.
6108
6119
  When importing a module from a package, note that __import__('A.B', ...)
6109
6120
  returns package A when fromlist is empty, but its submodule B when
6110
6121
  fromlist is not empty. The level argument is used to determine whether to