On Wed, 29 Sep 2010 14:34:33 +0200, Hrvoje Niksic wrote:
> Steven D'Aprano writes:
>> (This may change in the future. Given type(), and isinstance(), I'm not
>> sure what value __class__ adds.)
>
> None whatsoever. __class__ used to be necessary to tell the appart
> instances of different old-s
On Wed, 29 Sep 2010 14:46:18 -0400, Terry Reedy wrote:
>> In that sense the user
>> should be calling iter(foo) instead of foo.__iter__(), next(foo)
>> instead of foo.__next__(), and foo+bar instead of foo.__add__(bar).
>
> Yes. Guido added iter() and next() to the list of built-in functions,
> e
On 9/29/2010 8:34 AM, Hrvoje Niksic wrote:
Steven D'Aprano writes:
On Wed, 29 Sep 2010 02:20:55 +0100, MRAB wrote:
On 29/09/2010 01:19, Terry Reedy wrote:
A person using instances of a class should seldom use special names
directly. They are, in a sense, implementation details, even if
do
Steven D'Aprano writes:
> On Wed, 29 Sep 2010 02:20:55 +0100, MRAB wrote:
>
>> On 29/09/2010 01:19, Terry Reedy wrote:
>
>>> A person using instances of a class should seldom use special names
>>> directly. They are, in a sense, implementation details, even if
>>> documented. The idiom "if __name
On Wed, 29 Sep 2010 02:20:55 +0100, MRAB wrote:
> On 29/09/2010 01:19, Terry Reedy wrote:
>> A person using instances of a class should seldom use special names
>> directly. They are, in a sense, implementation details, even if
>> documented. The idiom "if __name__ == '__main__':" is an exception
On 29/09/2010 01:19, Terry Reedy wrote:
On 9/28/2010 5:27 AM, AlexWalk wrote:
In python 3.1.2(I'm using windows edition, 32bit), accessing __class__
of an int literal will raise a SyntaxException, while other literals
will not. For example. 1.__class__ is an error, while 1.1.__class__ runs
ok.
On 9/28/2010 5:27 AM, AlexWalk wrote:
In python 3.1.2(I'm using windows edition, 32bit), accessing __class__
of an int literal will raise a SyntaxException, while other literals
will not. For example. 1.__class__ is an error, while 1.1.__class__ runs
ok.
Third solution:
>>> type(0) is 0 .__clas
Tim Golden wrote:
On 28/09/2010 10:27, AlexWalk wrote:
In python 3.1.2(I'm using windows edition, 32bit), accessing __class__
of an int literal will raise a SyntaxException, while other literals
will not. For example. 1.__class__ is an error, while 1.1.__class__
runs ok.
I searched the pyth
Hello Alex,
On 2010-09-28 11:27, AlexWalk wrote:
> In python 3.1.2(I'm using windows edition, 32bit),
> accessing __class__ of an int literal will raise a
> SyntaxException, while other literals will not. For
> example. 1.__class__ is an error, while 1.1.__class__ runs
> ok.
>
> I searched the p
On 28/09/2010 10:27, AlexWalk wrote:
In python 3.1.2(I'm using windows edition, 32bit), accessing __class__ of an
int literal will raise a SyntaxException, while other literals will not. For
example. 1.__class__ is an error, while 1.1.__class__ runs ok.
I searched the python issue tracker but
In python 3.1.2(I'm using windows edition, 32bit), accessing __class__ of an
int literal will raise a SyntaxException, while other literals will not. For
example. 1.__class__ is an error, while 1.1.__class__ runs ok.
I searched the python issue tracker but failed to find relevant reports. I
w
11 matches
Mail list logo