[Python-ideas] Where-statement (Proposal for function expressions)
Terry Reedy
tjreedy at udel.edu
Sat Jul 18 00:12:48 CEST 2009
> To my eyes, the first is harder to read than the second one. Of
> course I can do this:
>
> f = self.someobject.get_generator()
> g = self.important_test
> mylist = [item in f if g(item)]:
>
> but then "f" and "g" pollute the calling context's namespace.
So what? Seriously, what harm does a temporary association do?
Especially when one can easily 'clean up' with 'del f,g' if it actually
make a functional difference or if one just wants to cater to an obsession.
In particular, why is this reason to *PERMANENTLYT pollute the language
with an otherwise useless new feature?
Unlike namespace associations, deleting language features is really
difficult.
Terry Jan Reedy
More information about the Python-ideas
mailing list