pfreixes <pfrei...@gmail.com> added the comment:

You are right, having the `pop` after the `set` it would remove the key from 
the events. Despite the workaround that you proposes is quite clean, it is 
kinda implicit.

The nature of the `pending` method is to give to the developer a way to check 
how many waiters are still pending. This not only helps to make this code more 
explicit also other pieces of code that might need access to the length of the 
waiters.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30457>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to