aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/pstats.py
diff options
context:
space:
mode:
authorachhina <amanschhina@gmail.com>2023-12-11 15:45:08 -0500
committerGitHub <noreply@github.com>2023-12-11 15:45:08 -0500
commita01022af23b27a9bfb4fadbcdb60b1ddf24a7220 (patch)
tree94379f595ca9d2b19effd282e2f8fc10ead2ae72 /Lib/pstats.py
parent0066ab5bc58a036b3f448cd6f9bbdd92120e39ba (diff)
downloadcpython-a01022af23b27a9bfb4fadbcdb60b1ddf24a7220.tar.gz
cpython-a01022af23b27a9bfb4fadbcdb60b1ddf24a7220.zip
GH-83162: Rename re.error for better clarity. (#101677)
Renamed re.error for clarity, and kept re.error for backward compatibility. Updated idlelib files at TJR's request. --------- Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/pstats.py')
-rw-r--r--Lib/pstats.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py
index 51bcca84188..2f054bb4011 100644
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -329,7 +329,7 @@ class Stats:
if isinstance(sel, str):
try:
rex = re.compile(sel)
- except re.error:
+ except re.PatternError:
msg += " <Invalid regular expression %r>\n" % sel
return new_list, msg
new_list = []