About __class__ of an int literal
sschwarzer at sschwarzer.net
Tue Sep 28 22:07:09 CEST 2010
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
> I searched the python issue tracker but failed to find
> relevant reports. I wonder if this is an unreported
It's nothing serious; the Python parser gets a bit
confused and probably reads the dot as decimal point.
If you use (1).__class__, you get what you expected.
More information about the Python-list