Add boolean type in the tag evaluation

This commit is contained in:
2016-04-01 13:42:24 +02:00
parent efc4a4a3c6
commit 20b97c972b

View File

@ -29,6 +29,8 @@ __re_dict__ = re.compile("""^\{\ *
'[^']*'
)
)*\ *\}$""", re.VERBOSE)
cdef object __etag__(str x):
if __re_int__.match(x):
v=int(x)
@ -36,6 +38,10 @@ cdef object __etag__(str x):
v=float(x)
elif __re_str__.match(x):
v=x[1:-1]
elif x=='False':
v=False
elif x=='True':
v=True
elif __re_dict__.match(x):
v=eval(x)
else: