summaryrefslogtreecommitdiff
path: root/docs/library/select.rst
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2021-08-12 13:59:29 +1000
committerDamien George <damien@micropython.org>2021-08-13 22:53:29 +1000
commitc737cde9472741337be0c0a66e8e99695c6a9b14 (patch)
tree1d2d5a3d9b0580cc2d0a8abacbec98a55fb3d791 /docs/library/select.rst
parent218606351c6f9688a3f90dad791bcb2109adcf1b (diff)
docs: Replace ufoo with foo in all docs.
Anywhere a module is mentioned, use its "non-u" name for consistency. The "import module" vs "import umodule" is something of a FAQ, and this commit intends to help clear that up. As a first approximation MicroPython is Python, and so imports should work the same as Python and use the same name, to a first approximation. The u-version of a module is a detail that can be learned later on, when the user wants to understand more and have finer control over importing. Existing Python code should just work, as much as it is possible to do that within the constraints of embedded systems, and the MicroPython documentation should match the idiomatic way to write Python code. With universal weak links for modules (via MICROPY_MODULE_WEAK_LINKS) users can consistently use "import foo" across all ports (with the exception of the minimal ports). And the ability to override/extend via "foo.py" continues to work well. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/library/select.rst')
-rw-r--r--docs/library/select.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/library/select.rst b/docs/library/select.rst
index 76202739c..57adbb49a 100644
--- a/docs/library/select.rst
+++ b/docs/library/select.rst
@@ -1,7 +1,7 @@
-:mod:`uselect` -- wait for events on a set of streams
-========================================================================
+:mod:`select` -- wait for events on a set of streams
+====================================================
-.. module:: uselect
+.. module:: select
:synopsis: wait for events on a set of streams
|see_cpython_module| :mod:`python:select`.
@@ -35,15 +35,15 @@ Methods
Register `stream` *obj* for polling. *eventmask* is logical OR of:
- * ``uselect.POLLIN`` - data available for reading
- * ``uselect.POLLOUT`` - more data can be written
+ * ``select.POLLIN`` - data available for reading
+ * ``select.POLLOUT`` - more data can be written
- Note that flags like ``uselect.POLLHUP`` and ``uselect.POLLERR`` are
+ Note that flags like ``select.POLLHUP`` and ``select.POLLERR`` are
*not* valid as input eventmask (these are unsolicited events which
will be returned from `poll()` regardless of whether they are asked
for). This semantics is per POSIX.
- *eventmask* defaults to ``uselect.POLLIN | uselect.POLLOUT``.
+ *eventmask* defaults to ``select.POLLIN | select.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
@@ -67,8 +67,8 @@ Methods
Returns list of (``obj``, ``event``, ...) tuples. There may be other elements in
tuple, depending on a platform and version, so don't assume that its size is 2.
The ``event`` element specifies which events happened with a stream and
- is a combination of ``uselect.POLL*`` constants described above. Note that
- flags ``uselect.POLLHUP`` and ``uselect.POLLERR`` can be returned at any time
+ is a combination of ``select.POLL*`` constants described above. Note that
+ flags ``select.POLLHUP`` and ``select.POLLERR`` can be returned at any time
(even if were not asked for), and must be acted on accordingly (the
corresponding stream unregistered from poll and likely closed), because
otherwise all further invocations of `poll()` may return immediately with