[New-bugs-announce] [issue34369] kqueue.control() documentation and implementation mismatch
Toshio Kuratomi
report at bugs.python.org
Fri Aug 10 02:20:16 EDT 2018
New submission from Toshio Kuratomi <a.badger at gmail.com>:
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.
----------
components: Library (Lib)
messages: 323357
nosy: a.badger
priority: normal
severity: normal
status: open
title: kqueue.control() documentation and implementation mismatch
type: behavior
versions: Python 2.7, Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34369>
_______________________________________
More information about the New-bugs-announce
mailing list