Kaydet (Commit) a4618736 authored tarafından Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Obvious simplification, now that "long" has disappeared.

üst ae0b088f
...@@ -369,7 +369,7 @@ class Sniffer: ...@@ -369,7 +369,7 @@ class Sniffer:
for col in list(columnTypes.keys()): for col in list(columnTypes.keys()):
for thisType in [int, int, float, complex]: for thisType in [int, float, complex]:
try: try:
thisType(row[col]) thisType(row[col])
break break
...@@ -379,10 +379,6 @@ class Sniffer: ...@@ -379,10 +379,6 @@ class Sniffer:
# fallback to length of string # fallback to length of string
thisType = len(row[col]) thisType = len(row[col])
# treat longs as ints
if thisType == int:
thisType = int
if thisType != columnTypes[col]: if thisType != columnTypes[col]:
if columnTypes[col] is None: # add new column type if columnTypes[col] is None: # add new column type
columnTypes[col] = thisType columnTypes[col] = thisType
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment