@@ -417,6 +417,22 @@ on bits for the fds of interest, and then afterward the whole bitmap has to be
417417linearly scanned again. :c:func: `!select ` is *O *\ (*highest file descriptor *), while
418418:c:func: `!poll ` is *O *\ (*number of file descriptors *).
419419
420+ .. method :: poll.register(fd[, eventmask])
421+
422+ Register a file descriptor with the polling object. Future calls to the
423+ :meth: `poll ` method will then check whether the file descriptor has any
424+ pending I/O events. *fd * can be either an integer, or an object with a
425+ :meth: `~io.IOBase.fileno ` method that returns an integer. File objects
426+ implement :meth: `!fileno `, so they can also be used as the argument.
427+
428+ Registering a file descriptor that's already registered is not an error, and
429+ has the same effect as registering the descriptor exactly once.
430+
431+ *eventmask * is an optional bitmask describing the type of events you want to
432+ check for, and can be a combination of the constants :const: `POLLIN `,
433+ :const: `POLLPRI `, and :const: `POLLOUT `, described in the table below. If not
434+ specified, the default value used will check for all 3 types of events.
435+
420436The event masks that can be used with polling objects are combinations of the
421437following constants:
422438
@@ -440,23 +456,6 @@ following constants:
440456 +--------------------+-------------------------------------------+
441457
442458
443- .. method :: poll.register(fd[, eventmask])
444-
445- Register a file descriptor with the polling object. Future calls to the
446- :meth: `poll ` method will then check whether the file descriptor has any
447- pending I/O events. *fd * can be either an integer, or an object with a
448- :meth: `~io.IOBase.fileno ` method that returns an integer. File objects
449- implement :meth: `!fileno `, so they can also be used as the argument.
450-
451- *eventmask * is an optional bitmask describing the type of events you want to
452- check for, and can be a combination of the constants :const: `POLLIN `,
453- :const: `POLLPRI `, and :const: `POLLOUT `, described in the table above. If not
454- specified, the default value used will check for all 3 types of events.
455-
456- Registering a file descriptor that's already registered is not an error, and has
457- the same effect as registering the descriptor exactly once.
458-
459-
460459.. method :: poll.modify(fd, eventmask)
461460
462461 Modifies an already registered fd. This has the same effect as
@@ -563,8 +562,6 @@ https://man.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
563562
564563 Name of the kernel filter.
565564
566- .. currentmodule :: select
567-
568565The following constants can be used with :attr: `kevent.filter `:
569566
570567 +---------------------------+---------------------------------------------+
@@ -596,8 +593,6 @@ The following constants can be used with :attr:`kevent.filter`:
596593
597594 Filter action.
598595
599- .. currentmodule :: select
600-
601596The following constants can be used with :attr: `kevent.flags `:
602597
603598 +---------------------------+----------------------------------------------+
@@ -629,8 +624,6 @@ The following constants can be used with :attr:`kevent.flags`:
629624
630625 Filter-specific flags.
631626
632- .. currentmodule :: select
633-
634627The following flags can be used with :attr: `kevent.fflags `, depending on the
635628filter type.
636629
0 commit comments