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

This commit is contained in:
Alex Waygood
2022-02-02 18:14:57 +00:00
committed by GitHub
parent b327f64d9a
commit 7ccbbdb30a
11 changed files with 36 additions and 24 deletions

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]: ...