Issue 21915: [doc] telnetlib.Telnet constructor does not match telnetlib.Telnet.init docstring (original) (raw)

Issue21915

Created on 2014-07-04 03:02 by ngie, last changed 2022-04-11 14:58 by admin.

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 ( 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.
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).
History
Date User Action Args
2022-04-11 14:58:05 admin set github: 66114
2021-11-29 17:04:21 iritkatriel set title: telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring -> [doc] telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstringtype: enhancementversions: + Python 3.11, - Python 2.7, Python 3.4
2014-07-04 13:42:19 r.david.murray set nosy: + r.david.murraymessages: +
2014-07-04 03:03:01 ngie set versions: + Python 2.7, Python 3.4
2014-07-04 03:02:55 ngie create