[issue21915] telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring
New submission from Garrett Cooper: telnetlib.Telnet.__init__ supports keyword arguments, but the documentation for 2.7.8 ( https://docs.python.org/2/library/telnetlib.html ) claims they're non-keyword arguments. The py3k docs are much better ( https://docs.python.org/3/library/telnetlib.html ), but unfortunately they still claim that timeout is a non-keyword argument. ---------- assignee: docs@python components: Documentation messages: 222263 nosy: docs@python, yaneurabeya priority: normal severity: normal status: open title: telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21915> _______________________________________
Changes by Garrett Cooper <yanegomi@gmail.com>: ---------- versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21915> _______________________________________
R. David Murray added the comment: There are reasons for both of these things. In 2.7 we generally used the [] notation for keyword arguments. In both, the timeout doesn't have a default that it is possible to document using our standard notation, so we use the [] notation. If you can think of a better way to document this, there are several other places where we have similar timeout arguments that could also be improved (but we haven't thought of an acceptable way to improve it yet). ---------- nosy: +r.david.murray _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21915> _______________________________________
participants (2)
-
Garrett Cooper
-
R. David Murray