]> granicus.if.org Git - python/commit
SF Patch #744104: Remove eval() from csv
authorRaymond Hettinger <python@rcn.com>
Thu, 12 Jun 2003 03:01:55 +0000 (03:01 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 12 Jun 2003 03:01:55 +0000 (03:01 +0000)
commit39a55920018ef19cc01b53063a2f090fe05d4982
tree675c2a6abb335aaf42e6bd368a877dfed05459b0
parent1546bc43feb5f0ccb09710342ac3267fcf8cf55d
SF Patch #744104: Remove eval() from csv

Eliminates the eval() step in the csv module 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.

As a by-product, eliminates a bare 'except' statement.
Lib/csv.py