From d251f2668874f454a2447eebbec2379a384ad2c9 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 28 Sep 2018 22:05:45 +0300 Subject: [PATCH] docs/uselect: Describe more aspects of poll.register/modify behavior. E.g., register() can be called again for the same object, while modify() will raise exception if object was not register()ed before. --- docs/library/uselect.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/library/uselect.rst b/docs/library/uselect.rst index 77d4584731..e1becc60ea 100644 --- a/docs/library/uselect.rst +++ b/docs/library/uselect.rst @@ -45,13 +45,18 @@ Methods *eventmask* defaults to ``uselect.POLLIN | uselect.POLLOUT``. + It is OK to call this function multiple times for the same *obj*. + Successive calls will update *obj*'s eventmask to the value of + *eventmask* (i.e. will behave as `modify()`). + .. method:: poll.unregister(obj) Unregister *obj* from polling. .. method:: poll.modify(obj, eventmask) - Modify the *eventmask* for *obj*. + Modify the *eventmask* for *obj*. If *obj* is not registered, `OSError` + is raised with error of ENOENT. .. method:: poll.poll(timeout=-1)