Giampaolo Rodola' added the comment: > 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30014> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com