Skip to content

Commit

Permalink
Added Decimal to numeric_types by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
blais authored and juarezr committed Oct 15, 2021
1 parent 59df1d7 commit 1047f9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions petl/compat.py
Expand Up @@ -15,9 +15,10 @@
if PY2:
from itertools import ifilter, ifilterfalse, imap, izip, izip_longest
from string import maketrans
from decimal import Decimal
string_types = basestring,
integer_types = int, long
numeric_types = bool, int, long, float
numeric_types = bool, int, long, float, Decimal
text_type = unicode
binary_type = str
from urllib2 import urlopen
Expand All @@ -40,13 +41,14 @@
imap = map
izip = zip
xrange = range
from decimal import Decimal
from itertools import filterfalse as ifilterfalse
from itertools import zip_longest as izip_longest
from functools import reduce
maketrans = str.maketrans
string_types = str,
integer_types = int,
numeric_types = bool, int, float
numeric_types = bool, int, float, Decimal
class_types = type,
text_type = str
binary_type = bytes
Expand Down

0 comments on commit 1047f9d

Please sign in to comment.