Why not 3.__class__ ?

Martin von Loewis loewis at informatik.hu-berlin.de
Tue Sep 18 15:21:53 CEST 2001

Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> writes:

> Mon, 17 Sep 2001 10:02:25 +0200, Alex Martelli <aleax at aleax.it> pisze:
> > But tokenizing "3.whatever" as anything different from a "3." token
> > followed by a "whatever" token would break backwards compatibility
> Is there any case in the grammar when a literal is directly followed
> by an identifier?

No, but that wouldn't be the only cause of ambiguity. Consider
"3.e17". This could be either a number in scientific notation, or the
e17 attribute of the 3. literal.


More information about the Python-list mailing list