Title: kqueue.control requires 2 params while docs say max_events (the second) defaults to 0
Type: behavior Stage:
Components: Documentation, Extension Modules Versions: Python 3.0, Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: christian.heimes, georg.brandl, ggenellina, ionelmc
Priority: normal Keywords: patch

Created on 2008-09-12 21:52 by ionelmc, last changed 2008-09-21 07:15 by georg.brandl. This issue is now closed.

File name Uploaded Description Edit
select.diff ggenellina, 2008-09-20 23:05
Messages (3)
msg73144 - (view) Author: Ionel Cristian Mărieș (ionelmc) Date: 2008-09-12 21:52

Docs say: "select.control(changelist, max_events=0[, timeout=None])"
However, control requires 2 params ("TypeError: control() takes at least
2 arguments (1 given)").

Also, it should be "kqueue" not "select" (There are 2 more like this
"epoll.fromfd(fd)" in the kqueue section, "select.kqueue(ident,
filter=KQ_FILTER_READ, flags=KQ_ADD, fflags=0, data=0, udata=0)" instead
of "select.kevent( ... ")
msg73477 - (view) Author: Gabriel Genellina (ggenellina) Date: 2008-09-20 23:05
Attached a documentation patch, including the kqueue.control function 

But I wonder if the code was incorrect instead - both the 
documentation and the function docstring specified a default value for 
max_events=0, and the corresponding variable was initialized to 0.
Perhaps the author meant to use PyArg_ParseTuple(args, "O|
iO:control",...) instead of the current "Oi|O:control"
msg73486 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-09-21 07:15
Committed patch in r66523. At least for now, code and docs are
consistent again.
Date User Action Args
2008-09-21 07:15:07georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg73486
2008-09-20 23:05:48ggenellinasetfiles: + select.diff
nosy: + ggenellina
messages: + msg73477
keywords: + patch
2008-09-12 23:02:27benjamin.petersonsetassignee: georg.brandl -> christian.heimes
nosy: + christian.heimes
2008-09-12 21:52:50ionelmccreate