pocketpy/pocketpy

[BUG] Parser should correctly identify empty tuple.

faze-geek opened this issue · 3 comments

Pocketpy main

>>> empty_tuple = ()
  File "<stdin>", line 1
    empty_tuple = ()
                   ^
SyntaxError: expected an expression, got )

>>> list_of_empty_tuples = [(),()]
  File "<stdin>", line 1
    list_of_empty_tuples = [(),()]
                             ^
SyntaxError: expected an expression, got )

Python

>>> empty_tuple = ()
>>> len(empty_tuple)
0

Kindly let me know if this is intended or it should be fixed.

This is intended. Empty tuple does not make sense.

I understand. Closing !