Skip to content

Display cvs.Error without TypeError context #114628

Closed
@smontanaro

Description

@smontanaro

Bug report

Bug description:

Working my way through some documentation nits for the csv module, I noticed this method definition:

    def _validate(self):
        try:
            _Dialect(self)
        except TypeError as e:
            # We do this for compatibility with py2.3
            raise Error(str(e))

Why should we still try and maintain compatibility with Python 2.3 at this late date? Shouldn't we just let TypeError bubble up to the user?

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-featureA feature request or enhancement

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions