Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Nick Coghlan
Neil Toronto wrote: > As long as patches are flying willy-nilly and we're just kicking around > ideas like puppies, I thought I'd offer one of my own. > > No, not a puppy. An idea. Of course, if it ends up beaten to death, I > might rather it were a puppy. My apologies if it's been discussed in

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Fredrik Lundh
Nick Coghlan wrote: > Any proposal such as this also needs to addresses all of the *other* name > binding statements in Python: > >try/except >for loop >with statement >def statement >class statement +import statement +list comprehension (in 2.X) and probably some o

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Ka-Ping Yee
On Tue, 10 Oct 2006, Fredrik Lundh wrote: > Nick Coghlan wrote: > > Any proposal such as this also needs to addresses all of the *other* name > > binding statements in Python: > > > >try/except > >for loop > >with statement > >def statement > >class statement > +import state

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Fredrik Lundh
Ka-Ping Yee wrote: > The only sane proposal i've seen that consistently addresses all > these cases, doesn't create new ambiguous situations, and doesn't > break most existing Python code is the "nonlocal" declaration. > >nonlocal x > > means > >"Don't make a new binding for x in the local

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Nick Coghlan
Ka-Ping Yee wrote: > On Tue, 10 Oct 2006, Fredrik Lundh wrote: >> Nick Coghlan wrote: >>> Any proposal such as this also needs to addresses all of the *other* name >>> binding statements in Python: >>> >>>try/except >>>for loop >>>with statement >>>def statement >>>class stateme

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Mike Krell
> > The only sane proposal i've seen that consistently addresses all > > these cases, doesn't create new ambiguous situations, and doesn't > > break most existing Python code is the "nonlocal" declaration. [snip] > Agreed - I believe the only real problem with the idea was that nobody could > com

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Fredrik Lundh
Mike Krell wrote: > The fact that this issue gets raised over and over again tells me that > I'm not alone in thinking this is a big language wart. there's no connection whatsoever between things that are raised now and then in various forums, and things that are real "seriously hurts people try

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Mike Krell
> there's no connection whatsoever between things that are raised now and > then in various forums, and things that are real "seriously hurts people > trying to get things done in Python" warts. Fair enough. > the vast majority of all Python programmers never uses nested functions > at all. Yes,

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Talin
You might want to check out this thread in which I proposed something similar (and got similar objections): http://mail.python.org/pipermail/python-dev/2006-July/066978.html Neil Toronto wrote: > As long as patches are flying willy-nilly and we're just kicking around > ideas like puppies, I tho

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Josiah Carlson
"Mike Krell" <[EMAIL PROTECTED]> wrote: > > > there's no connection whatsoever between things that are raised now and > > then in various forums, and things that are real "seriously hurts people > > trying to get things done in Python" warts. > > Fair enough. > > > the vast majority of all Pyth

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Mike Krell
> > Yes, but part of the reason for this may be this very wart. I know > > I'm campaigning for this as a fix for what the OP calls the "read only > > lexical scoping gotcha". A fix for that makes it much more convienent > > to write closures that modify closed-over values, which in turn makes > >

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Greg Ewing
Nick Coghlan wrote: > Re-using 'global' wasn't popular because it would actually be *wrong* for the > new semantics All things considered, re-using "global" is what I'd be most in favour of at the moment. I don't agree that it's wrong -- it's perfectly legitimate to regard "local" and "global"

Re: [Python-3000] Sky pie: a "var" keyword

2006-10-10 Thread Neil Toronto
Nick Coghlan wrote: >> The only sane proposal i've seen that consistently addresses all >> these cases, doesn't create new ambiguous situations, and doesn't >> break most existing Python code is the "nonlocal" declaration. >> >> nonlocal x >> >> means >> >> "Don't make a new binding for x i