[Python-checkins] bpo-46310: simplify `for` loop in `asyncio/windows_events` (GH-30334)

asvetlov webhook-mailer at python.org
Tue Jan 11 05:52:05 EST 2022


https://github.com/python/cpython/commit/fc75bfb8be8494e22123f2c14d1ab497c77cc22d
commit: fc75bfb8be8494e22123f2c14d1ab497c77cc22d
branch: main
author: Nikita Sobolev <mail at sobolevn.me>
committer: asvetlov <andrew.svetlov at gmail.com>
date: 2022-01-11T12:51:34+02:00
summary:

bpo-46310: simplify `for` loop in `asyncio/windows_events` (GH-30334)

files:
M Lib/asyncio/windows_events.py

diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 427d4624ad076..0d9a07ef4772e 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -839,7 +839,7 @@ def close(self):
             return
 
         # Cancel remaining registered operations.
-        for address, (fut, ov, obj, callback) in list(self._cache.items()):
+        for fut, ov, obj, callback in list(self._cache.values()):
             if fut.cancelled():
                 # Nothing to do with cancelled futures
                 pass



More information about the Python-checkins mailing list