things I wish python could do
Terry Reedy
tjreedy at udel.edu
Thu May 13 12:35:48 EDT 2004
"Jacek Generowicz" <jacek.generowicz at cern.ch> wrote in message
news:tyfk6zgpx6w.fsf at pcepsft001.cern.ch...
> Ryan Paul <segphault at sbcglobal.net> writes:
> Yes, I find the whole statement expression dichotomy one huge PITA.
Would you really prefer writing <target> = expression as set('<target>',
expression) or as the 'special-form' pseudofunction call setq(<target>,
expression)? Just about all Python statements are statements because they
would also be a PITA, and possibly more so, as expressions.
> > 4. assignments cant be made inside of anonymous functions.
>
> Actually, there's very little you can do in anonymous functions, given
> that you are restricted to a _single expression_.
Lambda expressions in Python are strictly an abbreviation for functions
with a trivial body ('return expression'), nothing more. Anonymity is a
wart, not a feature. The keyword is, to me, a mistake because of the false
expectations it stimulates.
> I'm feeling in a controversy-stirring mood. Can you tell?
Bait taken ;-)
Terry J. Reedy
More information about the Python-list
mailing list