get rid of u string literal

This commit is contained in:
j 2023-07-27 18:12:13 +02:00
commit 99e221095b
7 changed files with 98 additions and 98 deletions

View file

@ -224,16 +224,16 @@ def to36(q):
def from36(q):
return int(q, 36)
def int_value(strValue, default=u''):
def int_value(strValue, default=''):
"""
>>> int_value('abc23')
u'23'
'23'
>>> int_value(' abc23')
u'23'
'23'
>>> int_value('ab')
u''
''
"""
try:
val = re.compile('(\d+)').findall(str(strValue).strip())[0]
@ -241,16 +241,16 @@ def int_value(strValue, default=u''):
val = default
return val
def float_value(strValue, default=u''):
def float_value(strValue, default=''):
"""
>>> float_value('abc23.4')
u'23.4'
'23.4'
>>> float_value(' abc23.4')
u'23.4'
'23.4'
>>> float_value('ab')
u''
''
"""
try:
val = re.compile('([\d.]+)').findall(str(strValue).strip())[0]