Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a461873

Browse files
committed
Obvious simplification, now that "long" has disappeared.
1 parent ae0b088 commit a461873

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

Lib/csv.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def has_header(self, sample):
369369

370370
for col in list(columnTypes.keys()):
371371

372-
for thisType in [int, int, float, complex]:
372+
for thisType in [int, float, complex]:
373373
try:
374374
thisType(row[col])
375375
break
@@ -379,10 +379,6 @@ def has_header(self, sample):
379379
# fallback to length of string
380380
thisType = len(row[col])
381381

382-
# treat longs as ints
383-
if thisType == int:
384-
thisType = int
385-
386382
if thisType != columnTypes[col]:
387383
if columnTypes[col] is None: # add new column type
388384
columnTypes[col] = thisType

0 commit comments

Comments
 (0)