[Patches] [ python-Patches-455966 ] Allow leading 0 in float/imag literals

noreply@sourceforge.net noreply@sourceforge.net
Mon, 27 Aug 2001 17:31:39 -0700


Patches item #455966, was opened at 2001-08-27 17:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=455966&group_id=5470

Category: Parser/Compiler
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tim Peters (tim_one)
Assigned to: Guido van Rossum (gvanrossum)
Summary: Allow leading 0 in float/imag literals

Initial Comment:
Many years ago I was baffled that "0e0" as a literal 
gave an error (it doesn't as a string argument to 
float), and I never got used to it.  While fixing a 
bug earlier today, I noticed this comment in 
tokenizer.c:

/* XXX This is broken!  E.g.,
   09.9 should be accepted as float! */

09.9 is accepted after the patch, but along with stuff 
that isn't so clear, like 0777j same as 777j.  OTOH, 
even at that extreme, complex("0777j") returns 777j 
without this patch too.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=455966&group_id=5470