10000 Comment 0.9.1 alternative to windows.remove(win) out. · python/cpython@3f4f917 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f4f917

Browse files
committed
Comment 0.9.1 alternative to windows.remove(win) out.
1 parent c6913e7 commit 3f4f917

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Lib/lib-stdwin/mainloop.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ def register(win):
3030
def unregister(win):
3131
if win in windows:
3232
windows.remove(win) # Not in 0.9.1
33-
for i in range(len(windows)):
34-
if windows[i] = win:
35-
del windows[i]
36-
break
33+
# 0.9.1 solution:
34+
#for i in range(len(windows)):
35+
# if windows[i] = win:
36+
# del windows[i]
37+
# break
3738

3839

3940
# Interfaces used by WindowSched.

Lib/stdwin/mainloop.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ def register(win):
3030
def unregister(win):
3131
if win in windows:
3232
windows.remove(win) # Not in 0.9.1
33-
for i in range(len(windows)):
34-
if windows[i] = win:
35-
del windows[i]
36-
break
33+
# 0.9.1 solution:
34+
#for i in range(len(windows)):
35+
# if windows[i] = win:
36+
# del windows[i]
37+
# break
3738

3839

3940
# Interfaces used by WindowSched.

0 commit comments

Comments
 (0)
0