Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c126d7

Browse files
Issue #16819: IDLE method completion now correctly works for bytes literals.
1 parent 3108fb5 commit 8c126d7

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/idlelib/HyperParser.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ def get_expression(self):
232232
pass
233233
else:
234234
# We can't continue after other types of brackets
235+
if rawtext[pos] in "'\"":
236+
# Scan a string prefix
237+
while pos > 0 and rawtext[pos - 1] in "rRbB":
238+
pos -= 1
239+
last_identifier_pos = pos
235240
break
236241

237242
else:

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ Core and Builtins
189189
Library
190190
-------
191191

192+
- Issue #16819: IDLE method completion now correctly works for bytes literals.
193+
192194
- Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
193195

194196
- Issue 10527: make multiprocessing use poll() instead of select() if available.

0 commit comments

Comments
 (0)