Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b7d1ee

Browse files
committed
Fix DeprecationWarning on Python 3.10
1 parent 2552e6d commit 5b7d1ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tabulate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
from __future__ import print_function
66
from __future__ import unicode_literals
77
from collections import namedtuple
8-
from platform import python_version_tuple
8+
import sys
99
import re
1010
import math
1111

1212

13-
if python_version_tuple() >= ("3", "3", "0"):
13+
if sys.version_info >= (3, 3):
1414
from collections.abc import Iterable
1515
else:
1616
from collections import Iterable
1717

18-
if python_version_tuple()[0] < "3":
18+
if sys.version_info[0] < 3:
1919
from itertools import izip_longest
2020
from functools import partial
2121

0 commit comments

Comments
 (0)