On 12/20/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 12/20/06, Jim Jewett <[EMAIL PROTECTED]> wrote:
> > [(lambda i=i: i) for i in range(10)] > > => > > [(lambda i=0_i: i) for 0_i in range(10)] > > The argument to lambda can't be renamed, because it could be called as > > a keyword. > > Perhaps you were thinking of a textual > substitution? That's not at all how one would do this. Yes; I think I was still thinking of the Py2->Py3 translator as well. > I have no idea what you mean by "works as implemented". Do you propose > *not* to fix the scope bleed of list comprehension loop control > variables? That's not an option. I propose that if fixing the scope bleed *in a straightforward manner* entails other changes -- but those changes are restricted to expressions inside the the list comprehension -- then those other changes should be considered. Changes to scope resolution aren't great, but there will be one here anyhow (the "scope bleed" itself), and if something even more obscure also changes -- that would be a reasonable price to pay for a simpler solution. -jJ _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
