Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(36839)

Delta Between Two Patch Sets: Lib/csv.py

Issue 18829: csv produces confusing error message when passed a non-string delimiter
Left Patch Set: Created 6 years ago
Right Patch Set: Created 6 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/test/test_csv.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 1
2 """ 2 """
3 csv.py - read/write/investigate CSV files 3 csv.py - read/write/investigate CSV files
4 """ 4 """
5 5
6 import re 6 import re
7 from _csv import Error, __version__, writer, reader, register_dialect, \ 7 from _csv import Error, __version__, writer, reader, register_dialect, \
8 unregister_dialect, get_dialect, list_dialects, \ 8 unregister_dialect, get_dialect, list_dialects, \
9 field_size_limit, \ 9 field_size_limit, \
10 QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ 10 QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 hasHeader -= 1 440 hasHeader -= 1
441 else: # attempt typecast 441 else: # attempt typecast
442 try: 442 try:
443 colType(header[col]) 443 colType(header[col])
444 except (ValueError, TypeError): 444 except (ValueError, TypeError):
445 hasHeader += 1 445 hasHeader += 1
446 else: 446 else:
447 hasHeader -= 1 447 hasHeader -= 1
448 448
449 return hasHeader > 0 449 return hasHeader > 0
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+