From bedccc749796e9bad9d6066cebc9e703e8ce19f3 Mon Sep 17 00:00:00 2001 From: Shantanu Date: Sat, 16 May 2020 16:57:19 -0700 Subject: [PATCH] fractions: remove gcd in py39 (#4012) Co-authored-by: hauntsaninja <> --- stdlib/2and3/fractions.pyi | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/stdlib/2and3/fractions.pyi b/stdlib/2and3/fractions.pyi index ce3f89f88..d66b63783 100644 --- a/stdlib/2and3/fractions.pyi +++ b/stdlib/2and3/fractions.pyi @@ -12,14 +12,15 @@ import sys _ComparableNum = Union[int, float, Decimal, Real] -@overload -def gcd(a: int, b: int) -> int: ... -@overload -def gcd(a: Integral, b: int) -> Integral: ... -@overload -def gcd(a: int, b: Integral) -> Integral: ... -@overload -def gcd(a: Integral, b: Integral) -> Integral: ... +if sys.version_info < (3, 9): + @overload + def gcd(a: int, b: int) -> int: ... + @overload + def gcd(a: Integral, b: int) -> Integral: ... + @overload + def gcd(a: int, b: Integral) -> Integral: ... + @overload + def gcd(a: Integral, b: Integral) -> Integral: ... class Fraction(Rational):