Skip to content

Commit ebb5be4

Browse files
committed
Simplify the guessed-dialect validation comment
1 parent c0bd358 commit ebb5be4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/csv.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,8 @@ class dialect(Dialect):
264264
dialect.quotechar = quotechar or '"'
265265
dialect.skipinitialspace = skipinitialspace
266266

267-
# A guess can be inconsistent (for example delimiter == quotechar).
268-
# Building a reader validates it; re-raise the _csv ValueError as a
269-
# csv.Error so callers see the module's own exception type.
267+
# A guessed dialect can be inconsistent (delimiter == quotechar);
268+
# surface it as csv.Error, not a raw _csv ValueError.
270269
try:
271270
reader(StringIO(), dialect)
272271
except ValueError as e:

0 commit comments

Comments
 (0)