[issue38981] better name for re.error Exception class.

Serhiy Storchaka report at bugs.python.org
Mon Dec 9 02:32:54 EST 2019


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I am not sure about the new name. "re" is an abbreviation, so if include it in the exception name it should be "RE". I am not sure what name is better: RECompileError, REParseError, RESyntaxError, REError, CompileError, ParseError, SyntaxError or Error.

json raises JSONDecodeError, ElementTree raises ParseError, other xml modules raise ExpatError, csv raises Error, configparser raises subclasses of Error.

Many modules (at least 18: aifc, binhex, concurrent.futures, configparser, copy, cvs, ftplib, locale, mailbox, shutil, sqlite, sunau, test.support, uu, wave, webbrowser, xdrlib, xmlrpc.client) have an exception named just Error for module-specific errors.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38981>
_______________________________________


More information about the Python-bugs-list mailing list