When cvs.Error is raised when TypeError is caught,
the TypeError display and 'During handling' note is just noise
with duplicate information. Suppress with 'from None'.
try:
_Dialect(self)
except TypeError as e:
- # We do this for compatibility with py2.3
- raise Error(str(e))
+ # Re-raise to get a traceback showing more user code.
+ raise Error(str(e)) from None
class excel(Dialect):
"""Describe the usual properties of Excel-generated CSV files."""
--- /dev/null
+When csv.Error is raised when handling TypeError, do not print the TypeError
+traceback.