X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube_dl%2Fcompat.py;h=0c119e417ce86174a7b21a9639f160a17a3263a3;hb=1dc24093f81f349c22e6bda13cb05c26ac3266f1;hp=b257e2e8155c72ea6f560c2f7310ed8f5d0bb234;hpb=28572a1a0b27ba3ccedac5d8d093f925dfb7485f;p=youtube-dl diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py index b257e2e81..0c119e417 100644 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@ -2760,8 +2760,10 @@ else: compat_kwargs = lambda kwargs: kwargs -compat_numeric_types = ((int, float, long, complex) if sys.version_info[0] < 3 - else (int, float, complex)) +try: + compat_numeric_types = (int, float, long, complex) +except NameError: # Python 3 + compat_numeric_types = (int, float, complex) if sys.version_info < (2, 7):