mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-110721: Remove unused code from suggestions.c after moving PyErr_Display to use the traceback module (#113712)
This commit is contained in:
parent
802d4954f1
commit
a03ec20bcd
12 changed files with 117 additions and 225 deletions
|
@ -1497,6 +1497,13 @@ def _compute_suggestion_error(exc_value, tb, wrong_name):
|
|||
if hasattr(self, wrong_name):
|
||||
return f"self.{wrong_name}"
|
||||
|
||||
try:
|
||||
import _suggestions
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
return _suggestions._generate_suggestions(d, wrong_name)
|
||||
|
||||
# Compute closest match
|
||||
|
||||
if len(d) > _MAX_CANDIDATE_ITEMS:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue