]> granicus.if.org Git - python/commitdiff
Obvious simplification, now that "long" has disappeared.
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 24 Apr 2008 18:26:53 +0000 (18:26 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 24 Apr 2008 18:26:53 +0000 (18:26 +0000)
Lib/csv.py

index 53ed90c0f4ab2aac8cd6d1b42a728431d6065c5c..09f4cf444a367e07af030c4b73e2c9cd36de2c80 100644 (file)
@@ -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