a = b = 1 just syntactic sugar?
Martin v. Löwis
martin at v.loewis.de
Sun Jun 8 19:25:04 EDT 2003
Ed Avis <ed at membled.com> writes:
> Are you sure? This is an excerpt from
> <http://python.org/doc/current/ref/grammar.txt>:
I see. In Grammar/Grammar, I have
simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
Using grammar.txt instead, your specification is still
underspecified. You mention some detection of ambiguities. How exactly
would that work? For example, what is the meaning of
a = lambda b : return b > 0
Also, what is the meaning of the statements inside the lambda
expression, in particular of assignment and return statements?
E.g. if I have
x = lambda b:c=3
what happens if I invoke x(4)? What if x is
x = lambda c:c=3
What is the meaning of continue inside lambda?
Regards,
Martin
More information about the Python-list
mailing list