Charles-François Natali added the comment: > Guido van Rossum added the comment: > > Here's an attempt at fixing the ValueError. > > I don't like the exhaustive search much, but the alternative is to maintain > an inverse dict. What do you think?
I was going to suggest such an exhaustive search. I think it's the cleanest/simplest solution, and the performance overhead is IMO completely unimportant since it's not supposed to happen often, and if the key isn't found we're going to raise an exception anyway. So if we want to handle this case (and I think we should to be consistent), that's the best way to go. But I think that OSError should still be caught in EpollSelector.unregister(): since if the FD is closed before, epoll.unregister() will raise ENOENT/EBADF since the FD will have automatically been removed (exactly as for kqueue according to the man page). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19876> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com