]> granicus.if.org Git - python/commitdiff
Issue #16819: IDLE method completion now correctly works for bytes literals.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 1 Jan 2013 20:25:59 +0000 (22:25 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 1 Jan 2013 20:25:59 +0000 (22:25 +0200)
Lib/idlelib/HyperParser.py
Misc/NEWS

index 38a19f2189caff7d24836b4c4f2d5575467c69b4..4414de72bc5239e82b1bba0dfbae991754a2fc47 100644 (file)
@@ -232,6 +232,11 @@ class HyperParser:
                     pass
                 else:
                     # We can't continue after other types of brackets
+                    if rawtext[pos] in "'\"":
+                        # Scan a string prefix
+                        while pos > 0 and rawtext[pos - 1] in "rRbB":
+                            pos -= 1
+                        last_identifier_pos = pos
                     break
 
             else:
index a7e25344a99d19b7ace4a488c936f8d5a4bddd70..b9b14a79ba63077fd92c5aa04d0f37102f964995 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -189,6 +189,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #16819: IDLE method completion now correctly works for bytes literals.
+
 - Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
 
 - Issue 10527: make multiprocessing use poll() instead of select() if available.