[Python-checkins] cpython (3.2): PEP 3131: support non-ASCII characters in auto-completion of identifiers.

martin.v.loewis python-checkins at python.org
Sun Jun 3 12:33:39 CEST 2012


http://hg.python.org/cpython/rev/21a475aee5e0
changeset:   77326:21a475aee5e0
branch:      3.2
user:        Martin v. Löwis <martin at v.loewis.de>
date:        Sun Jun 03 12:32:42 2012 +0200
summary:
  PEP 3131: support non-ASCII characters in auto-completion of identifiers.

files:
  Lib/idlelib/AutoComplete.py |  2 +-
  Lib/idlelib/NEWS.txt        |  2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py
--- a/Lib/idlelib/AutoComplete.py
+++ b/Lib/idlelib/AutoComplete.py
@@ -143,7 +143,7 @@
         elif hp.is_in_code() and (not mode or mode==COMPLETE_ATTRIBUTES):
             self._remove_autocomplete_window()
             mode = COMPLETE_ATTRIBUTES
-            while i and curline[i-1] in ID_CHARS:
+            while i and curline[i-1] in ID_CHARS or ord(curline[i-1]) > 127:
                 i -= 1
             comp_start = curline[i:j]
             if i and curline[i-1] == '.':
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -2,7 +2,7 @@
 =========================
 
 - Issue #14937: Perform auto-completion of filenames in strings even for
-  non-ASCII filenames.
+  non-ASCII filenames. Likewise for identifiers.
 
 What's New in IDLE 3.2.3?
 =========================

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list