Closed Gnarflord closed 1 year ago
An interesting note: eval("")
in normal Python raises a SyntaxError.
>>> eval("")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 0
^
SyntaxError: unexpected EOF while parsing
Looks like this can be closed due to #108.
When giving simpleeval an empty string it raises this error: Traceback (most recent call last):
I propose to either throw an appropriate error or maybe return something. Wether that'd be an empty string or
None
is too philosophical for me but maybe there's an PIP on this? Anyways, something like this should suffice: