Skip to content

Commit 2092173

Browse files
Update Lib/csv.py
change lines 407-410, init and assignment columnTypes directly. Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent 4b22c77 commit 2092173

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/csv.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,9 @@ def has_header(self, sample):
404404
header = next(rdr) # assume first row is header
405405

406406
columns = len(header)
407-
columnTypes = {}
407+
columnTypes = {i: None for i in range(columns)}
408408
average_size = 0
409409
col_are_strings = True
410-
for i in range(columns): columnTypes[i] = None
411410

412411
checked = 0
413412
for row in rdr:

0 commit comments

Comments
 (0)