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
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
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
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
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
> > 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
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
> 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,
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
"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
> > 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
> >
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"
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
13 matches
Mail list logo