Title: telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring
Type: Stage:
Components: Documentation Versions: Python 3.4, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, ngie, r.david.murray
Priority: normal Keywords:

Created on 2014-07-04 03:02 by ngie, last changed 2014-07-04 13:42 by r.david.murray.

Messages (2)
msg222263 - (view) Author: Enji Cooper (ngie) * Date: 2014-07-04 03:02
telnetlib.Telnet.__init__ supports keyword arguments, but the documentation for 2.7.8 ( ) claims they're non-keyword arguments.

The py3k docs are much better ( ), but unfortunately they still claim that timeout is a non-keyword argument.
msg222283 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-07-04 13:42
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).
Date User Action Args
2014-07-04 13:42:19r.david.murraysetnosy: + r.david.murray
messages: + msg222283
2014-07-04 03:03:01ngiesetversions: + Python 2.7, Python 3.4
2014-07-04 03:02:55ngiecreate