isaacg1 / pyth

Pyth, an extremely concise language. Try it here:
https://pyth.herokuapp.com/
MIT License
263 stars 57 forks source link

.j <none> <none> does not work as expected when the input is empty #220

Closed GolfingSuccess closed 7 years ago

GolfingSuccess commented 7 years ago

This is the source code:

.j

The input is empty.

This is the error message:

Traceback (most recent call last):
  File "pyth.py", line 752, in <module>
  File "<string>", line 3, in <module>
  File "/app/macros.py", line 656, in eval_input
  File "/app/.heroku/python/lib/python3.4/ast.py", line 46, in literal_eval
  File "/app/.heroku/python/lib/python3.4/ast.py", line 35, in parse
  File "<unknown>", line 0

    ^
SyntaxError: unexpected EOF while parsing

AFAIK, it should output this instead:

1j

This works as intended, for +1 byte (which, in the sense of code-golf, I need to get rid of!!!):

.j0
isaacg1 commented 7 years ago

Fixed by 3ee3fcb