You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since it affects more than one module I suggest to discuss the idea about renaming exceptions of the Python-Ideas maillist first. Until different decision be made I am closing. Personally I think this is a duplicate of just discussed and rejected idea.
I merged the near-minimal PR with re.error 'updated' only in idlelib. I will do adjusted backports of the idlelib changes to keep the main bodies of its files in sync and then close.
Activity
Carreau commentedon Dec 5, 2019
better error/exception name for re.compile error.
Currently the error raise by re.compile when it fails to compile is
errordefined in sre_constants.py:This is quite disturbing as most exception start with an uppercase and have a tiny bit more descriptive name.
Would it be possible to have it renamed as something more explicit like
ReCompileError, and still keeping the potentialerroralias as deprecated ?serhiy-storchaka commentedon Dec 5, 2019
It is common practice that the module specific exception is called just "error". There is nothing wrong with this.
I do not see a need to introduce a different alias.
serhiy-storchaka commentedon Dec 5, 2019
See also the discussion about renaming json.loads(): https://mail.python.org/archives/list/python-ideas@python.org/thread/EJTIVQ2ZFSVHALTLRGFCOMOYGZYMKGQU/
Carreau commentedon Dec 5, 2019
Most of the module specific classes are
Error, noterror, at least with an uppercase E you know it's a class.It will be relatively tough or them to figure out that
erroris the type of the exception.Also it's not because something works that you can't improve it ...
serhiy-storchaka commentedon Dec 5, 2019
Since it affects more than one module I suggest to discuss the idea about renaming exceptions of the Python-Ideas maillist first. Until different decision be made I am closing. Personally I think this is a duplicate of just discussed and rejected idea.
Carreau commentedon Dec 5, 2019
Thanks for the advice I've done that !
Have a good day.
serhiy-storchaka commentedon Dec 7, 2019
Reopened after discussing on Python-ideas: https://mail.python.org/archives/list/python-ideas@python.org/thread/64NHNY6RD4HQWBSBV6J7XIN7UAHNTQBR/.
32 remaining items
Merge remote-tracking branch 'upstream/main' into pythonGH-83162
pythonGH-83162: Resolved merge conflicts.
Merge remote-tracking branch 'upstream/main' into pythonGH-83162
pythonGH-83162: Satisfy merge conflict.
pythonGH-83162: Unwrap paragraph.
pythonGH-83162: Add space back in.
GH-83162: Rename re.error for better clarity. (#101677)
terryjreedy commentedon Dec 12, 2023
I merged the near-minimal PR with re.error 'updated' only in idlelib. I will do adjusted backports of the idlelib changes to keep the main bodies of its files in sync and then close.
[3.12] pythongh-83162: Rename re.error in idlelib (python#101677)
[3.12] gh-83162: Rename re.error in idlelib (GH-101677) (#112987)
[3.12] pythongh-83162: Rename re.error in idlelib (pythonGH-101677) (p…
[3.11] [3.12] gh-83162: Rename re.error in idlelib (GH-101677) (GH-11…
pythonGH-83162: Rename re.error for better clarity. (python#101677)
pythonGH-83162: Rename re.error for better clarity. (python#101677)