Closed dideler closed 9 years ago
We need to keep these empty Python objects as objects instead of literal expressions, so we can treat them as Python objects. For example, len([])
would break.
""
will need to be a new expression as well someday, which yields a Python string object. Then we can handle Python-specific string processing in #24.
That makes sense, thanks for answering.
""
evaluates to a literal expression[]
evaluates to a new expressionWould it be useful to treat literal notations like
[]
,{}
,()
as literal expressions? Unfortunately I'm not familiar enough with filbert to think about it properly, so I'm just suggesting it.When the literal notation isn't empty, could it make things difficult since brackets and parentheses also have other uses? E.g.
[1, 2, 3]
vs[x for x in xrange(5) if x % 2 == 0]
or(1, 2, 3)
vs(2 + 3) * 4
.