aboutsummaryrefslogtreecommitdiff
path: root/Python/suggestions.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/suggestions.c')
-rw-r--r--Python/suggestions.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/suggestions.c b/Python/suggestions.c
index 6fb01f10cd..7fd62fbfab 100644
--- a/Python/suggestions.c
+++ b/Python/suggestions.c
@@ -149,6 +149,9 @@ calculate_suggestions(PyObject *dir,
if (item_str == NULL) {
return NULL;
}
+ if (PyUnicode_CompareWithASCIIString(name, item_str) == 0) {
+ continue;
+ }
// No more than 1/3 of the involved characters should need changed.
Py_ssize_t max_distance = (name_size + item_size + 3) * MOVE_COST / 6;
// Don't take matches we've already beaten.