a = b = 1 just syntactic sugar?
ed at membled.com
Mon Jun 9 22:43:53 CEST 2003
Moshe Zadka <m at moshez.org> writes:
>Well, I don't know about yield or exec, but I actually *would* like
>to print from lambdas,
>All this should not be taken to mean that I support "statements in
>lambdas" proposal. I would much prefer to have builtins which
>correspond to print and raise (perhaps operator.__print__ and
I too would be happy if there were readable and obvious (Pythonic,
even) alternatives to print, assert, dictionary-element-assignment and
so on that could then be used inside lambda bodies.
Having two identical ways to do the same thing (the 'print 5'
statement and the 'print(5)' expression) is unneeded duplication, so
probably the older styles could be deprecated and eventually removed.
(I don't imagine many people would shed tears if the current 'print'
syntax were replaced with something more consistent with normal method
calls; OTOH, if it is a good syntax, then it should be available for
user-defined procedures and not just for a few builtins.)
Ed Avis <ed at membled.com>
More information about the Python-list