From: Amaury Forgeot d'Arc Date: Thu, 24 Apr 2008 18:26:53 +0000 (+0000) Subject: Obvious simplification, now that "long" has disappeared. X-Git-Tag: v3.0a5~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4618736c037b23b99badfcab65296833f309c2a;p=thirdparty%2FPython%2Fcpython.git Obvious simplification, now that "long" has disappeared. --- diff --git a/Lib/csv.py b/Lib/csv.py index 53ed90c0f4ab..09f4cf444a36 100644 --- a/Lib/csv.py +++ b/Lib/csv.py @@ -369,7 +369,7 @@ class Sniffer: for col in list(columnTypes.keys()): - for thisType in [int, int, float, complex]: + for thisType in [int, float, complex]: try: thisType(row[col]) break @@ -379,10 +379,6 @@ class Sniffer: # fallback to length of string thisType = len(row[col]) - # treat longs as ints - if thisType == int: - thisType = int - if thisType != columnTypes[col]: if columnTypes[col] is None: # add new column type columnTypes[col] = thisType