[Patches] [ python-Patches-744104 ] Removed eval() from csv
SourceForge.net
noreply@sourceforge.net
Tue, 27 May 2003 00:43:35 -0700
Patches item #744104, was opened at 2003-05-27 02:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=744104&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Raymond Hettinger (rhettinger)
Assigned to: Skip Montanaro (montanaro)
Summary: Removed eval() from csv
Initial Comment:
The eval() step in the csv module can be eliminated,
resulting in better security, more clarity, and a little
speed.
The idea is to make successive attempts to coerce
the string to a python type:
int(s), long(s), float(s), etc.
This allows the logic to be controlled precisely and for
specific types to be included or excluded (unicode
types for instance).
The patch is attached and passes all regression
tests. It should also work fine under Py2.2.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=744104&group_id=5470