stdlib: Improve many __iter__ and constructor methods (#7112)

This commit is contained in:
Alex Waygood authored and GitHub committed 2022-02-02 19:14:57 +01:00
1 parent b327f64d9a
commit 7ccbbdb30a
11 files changed
+36 -24

No files matched your search

+2 -2
View File
@@ -25,9 +25,9 @@ class Fraction(Rational):
@overload
def __new__(cls: type[Self], __value: float | Decimal | str, *, _normalize: bool = ...) -> Self: ...
@classmethod
def from_float(cls, f: float) -> Fraction: ...
def from_float(cls: type[Self], f: float) -> Self: ...
@classmethod
def from_decimal(cls, dec: Decimal) -> Fraction: ...
def from_decimal(cls: type[Self], dec: Decimal) -> Self: ...
def limit_denominator(self, max_denominator: int = ...) -> Fraction: ...
if sys.version_info >= (3, 8):
def as_integer_ratio(self) -> tuple[int, int]: ...