This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xmorel
Recipients docs@python, xmorel
Date 2012-08-13.12:44:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344861900.41.0.500081964818.issue15639@psf.upfronthosting.co.za>
In-reply-to
Content
In both Python 2.7 and Python 3.x, csv.Error is documented as:

    Raised by any of the functions when an error is detected.

As far as I can tell from using the module and looking at the code, this is completely incorrect. There is actually a single instance of csv.Error being used: the instantiation of csv.Dialect (which converts TypeError raised from _csv._Dialect() into csv.Error, a comment notes that this is "for compatibility with py 2.3").

And the only way to hit that code paths seems to be subclassing `Dialect` and putting incorrect values in the various attributes (providing them to `csv.reader` raises a TypeError).

I believe the documentation to csv.Error should be changed to:

1. Mark it as effectively deprecated
2. Indicate that the only situation in which it it may be raised is when initializing a subclass of csv.Dialect
History
Date User Action Args
2012-08-13 12:45:00xmorelsetrecipients: + xmorel, docs@python
2012-08-13 12:45:00xmorelsetmessageid: <1344861900.41.0.500081964818.issue15639@psf.upfronthosting.co.za>
2012-08-13 12:44:59xmorellinkissue15639 messages
2012-08-13 12:44:59xmorelcreate