[Python-bugs-list] [ python-Bugs-801306 ] Bad RE in scanf example

SourceForge.net noreply at sourceforge.net
Sat Sep 6 15:10:07 EDT 2003


Bugs item #801306, was opened at 2003-09-05 12:03
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=801306&group_id=5470

Category: Documentation
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jimm Domingo (jimm_domingo)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Bad RE in scanf example

Initial Comment:
In section 4.2.6 "Examples" of the Python Library

Reference, the regular expression for scanf format

tokens %e, %E, %f, %g does not allow an optional sign

in the exponent.  The RE should be:



  [-+]?(\d+(\.\d*)?|\d*\.\d+)([eE][-+]?\d+)?



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

>Comment By: Brett Cannon (bcannon)
Date: 2003-09-06 14:10

Message:
Logged In: YES 
user_id=357491

Double-checking with K&R, Jimm is right and regex looks good to 

me.  Hope that helps in some way, Raymond.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=801306&group_id=5470



More information about the Python-bugs-list mailing list