differentmatt / filbert

JavaScript parser of Python
Other
133 stars 27 forks source link

Non-empty list constructor should not return empty list #51

Open dideler opened 9 years ago

dideler commented 9 years ago

list(1, 2, 3) should give a TypeError.

>>> list(1, 2, 3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: list() takes at most 1 argument (3 given)
>>> list((1, 2, 3))
[1, 2, 3]

In filbert, list(1, 2, 3) evaluates to an empty list. Note that in filbert list() correctly evaluates to an empty list and list((1, 2,3)) to a non-empty list.

nwinter commented 8 years ago

Currently it seems the list() constructor is broken, probably by Esper? Just says Dont do this yet.

screenshot 2016-05-23 08 51 23