]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Remove vestigial Python 2 `long` check (#925)
authorAarni Koskela <akx@iki.fi>
Wed, 2 Nov 2022 06:36:42 +0000 (08:36 +0200)
committerGitHub <noreply@github.com>
Wed, 2 Nov 2022 06:36:42 +0000 (06:36 +0000)
babel/numbers.py

index 373a9bd1657aa488ceb1efdaeeb3fd58d58b7997..8a341c4faf9b247604f6fd0ac149ac22e7ef0b6d 100644 (file)
@@ -24,13 +24,6 @@ import warnings
 
 from babel.core import default_locale, Locale, get_global
 
-try:
-    # Python 2
-    long
-except NameError:
-    # Python 3
-    long = int
-
 
 LC_NUMERIC = default_locale('LC_NUMERIC')
 
@@ -371,7 +364,7 @@ def get_decimal_precision(number):
 
 def get_decimal_quantum(precision):
     """Return minimal quantum of a number, as defined by precision."""
-    assert isinstance(precision, (int, long, decimal.Decimal))
+    assert isinstance(precision, (int, decimal.Decimal))
     return decimal.Decimal(10) ** (-precision)