Help me understand this

Beej beej at beej.us
Tue Jan 30 21:44:49 CET 2007


On Jan 30, 1:38 am, "Diez B. Roggisch" <d... at nospam.web.de> wrote:
> Because 2. is the start of a float-literal. That isn't distinguishable for
> the parsere otherwise.

Oh, excellent! I wonder why I didn't think of that--I was too busy in 
"get a field" mode it didn't even occur to me that the "." had a 
different context, no matter how much more obvious.

>>> print 2.
2.0
>>> type(2.)
<type 'float'>

-Beej




More information about the Python-list mailing list