> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> I'm sorry to see you missed it, but since I had answered this already in
>AP> this thread I saw at the moment no need to repeat it: There would be no
>AP> value for c, the line would raise an UnboundLocalError.
OK. That could have been chos
This is probably my last response to you in this thread. My impression
is that for the moment nothing productive can come from this exchange.
I have the feeling that you are not reading so much with the interntion
of understanding what I want to say, but with the intention of
confirming your suspit
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> When someone gets confused over the difference between rebinding or
>AP> mutating a variable on an intermediate scope, the explanation he
>AP> mostly seems to get boils down to: one is rebinding, the other is
>AP> mutation, this is a fundame
On 2006-07-08, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On 8 Jul 2006 18:52:56 GMT, Antoon Pardon <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>>
>> I'm not fooled by that phrase. I just think the mutate vs rebind
>> explanation is not complete.
>>
>> If we have tw
On 2006-07-09, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>
>>AP> It is conceptually different. In the line 'a = b' you don't need to
>>AP> search for the scope of a. You know it is the current scope, if you
>
> Except when it has been declared
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> It is conceptually different. In the line 'a = b' you don't need to
>AP> search for the scope of a. You know it is the current scope, if you
Except when it has been declared global.
>AP> want to know the scope of b on the other hand, you n
On 2006-07-07, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>
>>AP> On 2006-07-07, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>>AP> Could you maybe clarify what problem we are discussi
On 2006-07-07, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> "Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> And if Nested variables are harmfull,
>
> I don't know if anyone said that they were, but Guido obviously does not
> think so, or he would not have added the
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> On 2006-07-07, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>>>
>AP> Could you maybe clarify what problem we are discussing? All I wrote
>AP> was that with an assignment the search for t
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> others might be helped if you took the trouble of explaining
> what was wrong.
Aside from F., I tried to explain what I think you said wrong. Did you
read it? Did it help any?
tjr
--
http://mail.python.org/mai
Fredrik Lundh wrote:
> Bruno Desthuilliers wrote:
>
>> Certainly not. Nested scopes allow closures, which allow decorators and
>> lot of *very* useful things.
>
>
> decorators can be trivially implemented as classes, of course. it's a
> bit unfortunate that many people seem to think that decora
On 2006-07-07, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>
>>> have any of your "my mental model of how Python works is more important
>>> than how it actually works" ever had a point ?
>>
>> Be free to correct me. But just suggesting that I'm wrong doesn't help
>> me in cha
On 2006-07-07, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Antoon "I'm no nincompoop, but I play one on the internet" Pardon wrote:
>
>> I don't see the contradiction. That Namespaces and names lookup are
>> fundamentel parts of the Python language, doesn't mean that
>> the right behaviour can't be
On 2006-07-07, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>
>>AP> Could you maybe clarify what problem we are discussing? All I wrote
>>AP> was that with an assignment the search for the lefthand variable
>>AP> depends on whether the lefthand si
Bruno Desthuilliers wrote:
> Certainly not. Nested scopes allow closures, which allow decorators and
> lot of *very* useful things.
decorators can be trivially implemented as classes, of course. it's a
bit unfortunate that many people seem to think that decorators *have* to
be implemented as n
Antoon Pardon wrote:
> On 2006-07-06, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>
>
>>>AP> Aren't we now talking about implementation details? Sure the compilor
>>>AP> can set things up so that local names are bound to the local scope and
>>>AP> so the same code can be used. But it seems somewh
Piet van Oostrum wrote:
(snip)
> There is no big difference I think. Only Python doesn't have syntax for the
> former. Older versions of Python didn't even have nested scopes. maybe it
> was a mistake to add them.
Certainly not. Nested scopes allow closures, which allow decorators and
lot of *very
Antoon Pardon wrote:
> On 2006-07-06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
>>Antoon Pardon wrote:
>>
>>>On 2006-07-05, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>It's not about "finding a name/identifier", it's about the difference
>>>between (re)binding a name and
Piet van Oostrum wrote:
> There is no big difference I think. Only Python doesn't have syntax for the
> former. Older versions of Python didn't even have nested scopes.
arbitrarily nested scopes, at least. the old local/global/builtin
approach (the LGB rule) is of course a kind of nesting; the
Antoon "I'm no nincompoop, but I play one on the internet" Pardon wrote:
> I don't see the contradiction. That Namespaces and names lookup are
> fundamentel parts of the Python language, doesn't mean that
> the right behaviour can't be implemented in multiple ways and
> doesn't contradict that a
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> Could you maybe clarify what problem we are discussing? All I wrote
>AP> was that with an assignment the search for the lefthand variable
>AP> depends on whether the lefthand side is a simple variable or
>AP> more complicated.
What do you
> "Terry Reedy" <[EMAIL PROTECTED]> (TR) wrote:
>TR> "Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
>TR> news:[EMAIL PROTECTED]
>>> And if Nested variables are harmfull,
>TR> I don't know if anyone said that they were, but Guido obviously does not
>TR> think so, or he would not have
Antoon Pardon wrote:
>> have any of your "my mental model of how Python works is more important
>> than how it actually works" ever had a point ?
>
> Be free to correct me. But just suggesting that I'm wrong doesn't help
> me in changing my mental model.
over the years, enough people have waste
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> And if Nested variables are harmfull,
I don't know if anyone said that they were, but Guido obviously does not
think so, or he would not have added them. So skip that.
> what is then the big difference between rebi
On 2006-07-06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> On 2006-07-05, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>
>>It's not about "finding a name/identifier", it's about the difference
>>between (re)binding a name and mutating an object.
>>>
AP> The
On 2006-07-06, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>AP> Aren't we now talking about implementation details? Sure the compilor
>>AP> can set things up so that local names are bound to the local scope and
>>AP> so the same code can be used. But it seems somewhere was made the
>>AP> decision
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> Well if someone explains what is wrong about my understanding, I
>AP> certainly care about that (although I confess to sometimes being
>AP> impatient) but someone just stating he is not sure I understand?
That is just a euphemistic way of s
Antoon Pardon wrote:
> On 2006-07-05, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>
>>>Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>>
>>>AP> On 2006-07-05, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>>>
>Antoon Pardon wrote:
>(snip)
>
>>Well no matter what explanation you
On 2006-07-05, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>
>>AP> On 2006-07-05, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
Antoon Pardon wrote:
(snip)
> Well no matter what explanation you give to it, and I understand how it
>
On 2006-07-05, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>
>> Python could have chosen an approach with a "nested" keyword
>
> sure, and Python could also have been invented by aliens, powered by
> space potatoes, and been illegal to inhale in Belgium.
At one time one could
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> On 2006-07-05, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>>> Antoon Pardon wrote:
>>> (snip)
Well no matter what explanation you give to it, and I understand how it
works,
>>>
>>> I'm not sure of this.
>AP> Should I care abo
Antoon Pardon wrote:
> Python could have chosen an approach with a "nested" keyword
sure, and Python could also have been invented by aliens, powered by
space potatoes, and been illegal to inhale in Belgium.
have any of your "my mental model of how Python works is more important
than how it ac
On 2006-07-05, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
> (snip)
>> Well no matter what explanation you give to it, and I understand how it
>> works,
>
> I'm not sure of this.
Should I care about that?
>> I keep finding it strange that something like
>>
>> k = [0]
Bruno Desthuilliers wrote:
> It's not about "finding a name/identifier", it's about the difference
> between (re)binding a name and mutating an object.
the difference between binding and performing an operation on an object
(mutating or not), in fact.
this is Python 101.
--
http://mail.pyth
Antoon Pardon wrote:
(snip)
> Well no matter what explanation you give to it, and I understand how it
> works,
I'm not sure of this.
> I keep finding it strange that something like
>
> k = [0]
> def f(i):
> k[0] += i
> f(2)
>
> works but the following doesn't
>
> k = 0
> def f(i)
On 2006-07-04, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> Tim N. van der Leeuw wrote:
>
>> Hi,
>>
>> The following might be documented somewhere, but it hit me unexpectedly
>> and I couldn't exactly find this in the manual either.
>>
>> Problem is, that I cannot use augmented assignment operat
Tim N. van der Leeuw wrote:
> Hi,
>
> The following might be documented somewhere, but it hit me unexpectedly
> and I couldn't exactly find this in the manual either.
>
> Problem is, that I cannot use augmented assignment operators in a
> nested scope, on variables from the outer scope:
> Is
Hi,
The following might be documented somewhere, but it hit me unexpectedly
and I couldn't exactly find this in the manual either.
Problem is, that I cannot use augmented assignment operators in a
nested scope, on variables from the outer scope:
PythonWin 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC
38 matches
Mail list logo