Closed tfwright closed 10 months ago
Unfortunately, at the moment, raising is the best way to go. That's because the library was designed to work with streaming and, when streaming, it is tricky to error in the middle of streaming without raising (it is possible, just trickier) and changing it now would be backwards incompatible as you mentioned.
Currently when parsing invalid CSV a ParseError is raised. This behavior isn't documented in function docs/type specs and would seem to violate the widespread convention of naming functions that can raise with a
!
.I would propose to add some documentation around that (and possibly fix the type spec?)
As part of that it would be nice to offer some guidance on how to approach parsing CSV that may be invalid. Is catching the error the best approach?