Message291274
> The idea is to reuse _BaseSelectorImpl.register() and
> _BaseSelectorImpl.unregister() to factorize the code.
You can't factorize the logic of modify() into those as they do two different things. I also don't like repeating the same thing 3 times but given how the module is organized I'm not sure how to do that as I need to pass 3 things around: the low-level selector (epoll, poll, whatever) and the read and write constants (POLLIN, EPOLLIN) which change depending on the selector being used.
The same thing applies to the devpoll class (http://bugs.python.org/issue18931).
I can write a second patch which to refactor the whole module if that is desirable but I prefer to do that in another PR. |
|
Date |
User |
Action |
Args |
2017-04-07 13:39:46 | giampaolo.rodola | set | recipients:
+ giampaolo.rodola, gvanrossum, vstinner, neologix, yselivanov |
2017-04-07 13:39:46 | giampaolo.rodola | set | messageid: <1491572386.67.0.193607596245.issue30014@psf.upfronthosting.co.za> |
2017-04-07 13:39:46 | giampaolo.rodola | link | issue30014 messages |
2017-04-07 13:39:46 | giampaolo.rodola | create | |
|