drop six and python2 support
This commit is contained in:
parent
955b4a4e9b
commit
adad3be419
31 changed files with 54 additions and 426 deletions
|
|
@ -4,8 +4,6 @@ import math
|
|||
import re
|
||||
import string
|
||||
|
||||
from six import text_type
|
||||
|
||||
def toAZ(num):
|
||||
"""
|
||||
Converts an integer to bijective base 26 string using A-Z
|
||||
|
|
@ -238,7 +236,7 @@ def int_value(strValue, default=u''):
|
|||
u''
|
||||
"""
|
||||
try:
|
||||
val = re.compile('(\d+)').findall(text_type(strValue).strip())[0]
|
||||
val = re.compile('(\d+)').findall(str(strValue).strip())[0]
|
||||
except:
|
||||
val = default
|
||||
return val
|
||||
|
|
@ -255,7 +253,7 @@ def float_value(strValue, default=u''):
|
|||
u''
|
||||
"""
|
||||
try:
|
||||
val = re.compile('([\d.]+)').findall(text_type(strValue).strip())[0]
|
||||
val = re.compile('([\d.]+)').findall(str(strValue).strip())[0]
|
||||
except:
|
||||
val = default
|
||||
return val
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue