
July 18, 2009
12:12 a.m.
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