mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Comment 0.9.1 alternative to windows.remove(win) out.
This commit is contained in:
parent
c6913e7da2
commit
3f4f91704c
2 changed files with 10 additions and 8 deletions
|
@ -30,10 +30,11 @@ def register(win):
|
||||||
def unregister(win):
|
def unregister(win):
|
||||||
if win in windows:
|
if win in windows:
|
||||||
windows.remove(win) # Not in 0.9.1
|
windows.remove(win) # Not in 0.9.1
|
||||||
for i in range(len(windows)):
|
# 0.9.1 solution:
|
||||||
if windows[i] = win:
|
#for i in range(len(windows)):
|
||||||
del windows[i]
|
# if windows[i] = win:
|
||||||
break
|
# del windows[i]
|
||||||
|
# break
|
||||||
|
|
||||||
|
|
||||||
# Interfaces used by WindowSched.
|
# Interfaces used by WindowSched.
|
||||||
|
|
|
@ -30,10 +30,11 @@ def register(win):
|
||||||
def unregister(win):
|
def unregister(win):
|
||||||
if win in windows:
|
if win in windows:
|
||||||
windows.remove(win) # Not in 0.9.1
|
windows.remove(win) # Not in 0.9.1
|
||||||
for i in range(len(windows)):
|
# 0.9.1 solution:
|
||||||
if windows[i] = win:
|
#for i in range(len(windows)):
|
||||||
del windows[i]
|
# if windows[i] = win:
|
||||||
break
|
# del windows[i]
|
||||||
|
# break
|
||||||
|
|
||||||
|
|
||||||
# Interfaces used by WindowSched.
|
# Interfaces used by WindowSched.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue