1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-16 17:20:23 +03:00

solve issue Floats don't work in the python implementation. #646

This commit is contained in:
jero98772 2024-06-25 21:02:08 -05:00
parent dcf8f4d7b9
commit 93e6ba02a1

View File

@ -31,7 +31,7 @@ def read_atom(reader):
string_re = re.compile(r'"(?:[\\].|[^\\"])*"')
token = reader.next()
if re.match(int_re, token): return int(token)
elif re.match(float_re, token): return int(token)
elif re.match(float_re, token): return float(token)
elif re.match(string_re, token):return _s2u(_unescape(token[1:-1]))
elif token[0] == '"': raise Exception("expected '\"', got EOF")
elif token[0] == ':': return _keyword(token[1:])