From: Serhiy Storchaka Date: Tue, 1 Jan 2013 20:25:59 +0000 (+0200) Subject: Issue #16819: IDLE method completion now correctly works for bytes literals. X-Git-Tag: v3.3.1rc1~444^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8c126d7abd67fbb88a58d0efbdad573fc6043e76;p=thirdparty%2FPython%2Fcpython.git Issue #16819: IDLE method completion now correctly works for bytes literals. --- diff --git a/Lib/idlelib/HyperParser.py b/Lib/idlelib/HyperParser.py index 38a19f2189ca..4414de72bc52 100644 --- a/Lib/idlelib/HyperParser.py +++ b/Lib/idlelib/HyperParser.py @@ -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: diff --git a/Misc/NEWS b/Misc/NEWS index a7e25344a99d..b9b14a79ba63 100644 --- 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.