On 2019-02-27 12:34:37 -0500, Dennis Lee Bieber wrote:
> On Tue, 26 Feb 2019 19:15:16 -0800 (PST), jf...@ms4.hinet.net declaimed the
> following:
>
> >So, may I say that the Python compiler is a multi-pass one?
>
> No... that is implementation dependent...
True, but
> The common Pyt
jf...@ms4.hinet.net於 2019年2月26日星期二 UTC+8下午4時46分04秒寫道:
> ast於 2019年2月26日星期二 UTC+8上午12時25分40秒寫道:
> > Hello
> >
> > I noticed a quirk difference between classes and functions
> >
> > >>> x=0
> > >>>
> > >>> cla
Chris Angelico於 2019年2月27日星期三 UTC+8上午11時29分04秒寫道:
> On Wed, Feb 27, 2019 at 2:21 PM wrote:
> >
> > Chris Angelico於 2019年2月27日星期三 UTC+8上午9時25分11秒寫道:
> > > On Wed, Feb 27, 2019 at 12:21 PM wrote:
> > > >
> > > > Gregory Ewing at 2019/2/27 AM 5:26:49 wrote:
> > > > > Thomas Jollans wrote:
> > > > >
On Wed, Feb 27, 2019 at 2:21 PM wrote:
>
> Chris Angelico於 2019年2月27日星期三 UTC+8上午9時25分11秒寫道:
> > On Wed, Feb 27, 2019 at 12:21 PM wrote:
> > >
> > > Gregory Ewing at 2019/2/27 AM 5:26:49 wrote:
> > > > Thomas Jollans wrote:
> > > > > I imagine there's a justification for the difference in behaviou
Chris Angelico於 2019年2月27日星期三 UTC+8上午9時25分11秒寫道:
> On Wed, Feb 27, 2019 at 12:21 PM wrote:
> >
> > Gregory Ewing at 2019/2/27 AM 5:26:49 wrote:
> > > Thomas Jollans wrote:
> > > > I imagine there's a justification for the difference in behaviour to do
> > > > with the fact that the body of a class
On Wed, Feb 27, 2019 at 12:21 PM wrote:
>
> Gregory Ewing at 2019/2/27 AM 5:26:49 wrote:
> > Thomas Jollans wrote:
> > > I imagine there's a justification for the difference in behaviour to do
> > > with the fact that the body of a class is only ever executed once, while
> > > the body of a functi
On 2/26/19, Gregory Ewing wrote:
> Thomas Jollans wrote:
>> I imagine there's a justification for the difference in behaviour to do
>> with the fact that the body of a class is only ever executed once, while
>> the body of a function is executed multiple times.
>
> I suspect there isn't any deep r
Gregory Ewing at 2019/2/27 AM 5:26:49 wrote:
> Thomas Jollans wrote:
> > I imagine there's a justification for the difference in behaviour to do
> > with the fact that the body of a class is only ever executed once, while
> > the body of a function is executed multiple times.
>
> I suspect there i
#x27;s 117 bugs in the code.
-Original Message-
From: Python-list On
Behalf Of Gregory Ewing
Sent: Tuesday, February 26, 2019 4:27 PM
To: python-list@python.org
Subject: Re: Quirk difference between classes and functions
Thomas Jollans wrote:
> I imagine there's a justification for
Thomas Jollans wrote:
I imagine there's a justification for the difference in behaviour to do
with the fact that the body of a class is only ever executed once, while
the body of a function is executed multiple times.
I suspect there isn't any deep reason for it, rather it's just
something that
On 25/02/2019 21.15, Chris Angelico wrote:
> On Tue, Feb 26, 2019 at 6:58 AM DL Neil
> wrote:
>>
>> On 26/02/19 5:25 AM, ast wrote:
>>> I noticed a quirk difference between classes and functions
>>> >>> x=0
>>> >>> class Test:
ast於 2019年2月26日星期二 UTC+8上午12時25分40秒寫道:
> Hello
>
> I noticed a quirk difference between classes and functions
>
> >>> x=0
> >>>
> >>> class Test:
> x = x+1
> print(x)
> x = x+1
> print(x)
>
On Tue, Feb 26, 2019 at 5:06 PM Gregory Ewing
wrote:
>
> Chris Angelico wrote:
> > Classes and functions behave differently. Inside a function, a name is
> > local if it's ever assigned to; but in a class, this is not the case.
>
> Actually, it is. Assigning to a name in a class body makes it part
Chris Angelico wrote:
Classes and functions behave differently. Inside a function, a name is
local if it's ever assigned to; but in a class, this is not the case.
Actually, it is. Assigning to a name in a class body makes it part
of the class namespace, which is the local namespace at the time
On Tue, Feb 26, 2019 at 6:58 AM DL Neil wrote:
>
> On 26/02/19 5:25 AM, ast wrote:
> > I noticed a quirk difference between classes and functions
> > >>> x=0
> > >>> class Test:
> > x = x+1
> > print(x)
> >
On 26/02/19 5:25 AM, ast wrote:
I noticed a quirk difference between classes and functions
>>> x=0
>>> class Test:
x = x+1
print(x)
x = x+1
print(x)
...
Previous code doesn't generate any errors.
x at the right of = in first "
Hello
I noticed a quirk difference between classes and functions
>>> x=0
>>>
>>> class Test:
x = x+1
print(x)
x = x+1
print(x)
1
2
>>> print(x)
0
Previous code doesn't generate any errors.
x at the right of = in fi
17 matches
Mail list logo