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.
Steven D'Aprano st...@remove-this-cybersource.com.au 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
On 9/29/2010 8:34 AM, Hrvoje Niksic wrote:
Steven D'Apranost...@remove-this-cybersource.com.au 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
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,
even
On Wed, 29 Sep 2010 14:34:33 +0200, Hrvoje Niksic wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au 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
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
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
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 python
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
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
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.
11 matches
Mail list logo