[Python-ideas] Multi-statement anonymous functions
Steven D'Aprano
steve at pearwood.info
Thu Jan 23 00:38:56 CET 2014
On Wed, Jan 22, 2014 at 07:43:26PM +0700, musicdenotation at gmail.com wrote:
> 1. Mutable namespaces and variables are for computation processes like
> while or for loops. They are not for temporary variables (that is why
> classes and functions have their own scopes).
> 2. I want not to worry about name clashes.
You haven't quoted any context to these two points, so I don't really
know how to interpret them.
As far as point 1 goes, yes, I cautiously agree, but I don't understand
your point, what you think that fact implies, or what relevance it has
to the question of multi-statement lambda.
As for point 2, I think everybody agrees that having to worry about name
clashes is a bad thing. That's why modern programming languages like
Python have multiple mechanisms for avoid name clashes, e.g. functions,
modules. To say nothing of the good ol' fashioned technique of using
naming conventions to avoid nameclashes in the same scope. If somebody
*routinely* and *frequently* finds themselves having to worry about
clashes, they are probably doing something wrong.
But, I really don't understand your point. If you think this is relevant
to the proposal, you should explain the connection, not just drop
cryptic observations on the list.
--
Steven
More information about the Python-ideas
mailing list