mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
bpo-45975: Use walrus operator for some idlelib while loops (GH-31083)
This commit is contained in:
parent
164a017e13
commit
51a95be1d0
5 changed files with 9 additions and 24 deletions
|
|
@ -471,10 +471,7 @@ class ShellSidebar(BaseSideBar):
|
|||
index = text.index("@0,0")
|
||||
if index.split('.', 1)[1] != '0':
|
||||
index = text.index(f'{index}+1line linestart')
|
||||
while True:
|
||||
lineinfo = text.dlineinfo(index)
|
||||
if lineinfo is None:
|
||||
break
|
||||
while (lineinfo := text.dlineinfo(index)) is not None:
|
||||
y = lineinfo[1]
|
||||
prev_newline_tagnames = text_tagnames(f"{index} linestart -1c")
|
||||
prompt = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue