diff --git a/Lib/idlelib/HyperParser.py b/Lib/idlelib/HyperParser.py index 38a19f2189c..4af4b085c7c 100644 --- a/Lib/idlelib/HyperParser.py +++ b/Lib/idlelib/HyperParser.py @@ -232,6 +232,11 @@ def get_expression(self): 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 "rRbBuU": + pos -= 1 + last_identifier_pos = pos break else: diff --git a/Misc/NEWS b/Misc/NEWS index 726777ec0a8..594d7f1ff77 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -200,6 +200,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 #16787: Increase asyncore and asynchat default output buffers size, to