Message323357
The current kqueue documentation specifies that timeout is a keyword argument but it can only be passed as a positional argument right now:
>>> import select
>>> ko = select.kqueue()
>>> ko.control([1], 0, timeout=10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: control() takes no keyword arguments
>>> help(ko.control)
Help on built-in function control:
control(...) method of select.kqueue instance
control(changelist, max_events[, timeout=None]) -> eventlist
Calls the kernel kevent function.
- changelist must be an iterable of kevent objects describing the changes
to be made to the kernel's watch list or None.
- max_events lets you specify the maximum number of events that the
kernel will return.
- timeout is the maximum time to wait in seconds, or else None,
to wait forever. timeout accepts floats for smaller timeouts, too.
This may be related to https://bugs.python.org/issue3852 in which the max_events argument used to be documented as optional but the code made it mandatory. |
|
Date |
User |
Action |
Args |
2018-08-10 06:20:16 | a.badger | set | recipients:
+ a.badger |
2018-08-10 06:20:16 | a.badger | set | messageid: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> |
2018-08-10 06:20:16 | a.badger | link | issue34369 messages |
2018-08-10 06:20:16 | a.badger | create | |
|