[issue29621] telnetlib.Telnet.write gives confusing error message when a string is passed in

R. David Murray report at bugs.python.org
Thu Apr 27 22:03:20 EDT 2017


R. David Murray added the comment:

We generally don't do this kind of type checking in the standard library.  The message may not be clear, but it is accurate and decipherable, especially given the fact that the write parameter name is 'buffer'.  I don't think anything should be done here.  If you want type checking use the types module :)

Thanks for the PR, @corona10, but I think we should just close this issue.  Other devs may disagree, though, so I'm not closing it myself.

On the other hand, enhancing telnetlib to also work with strings might be a nice project for someone.  It would require some design discussion, though, so I don't think anyone should hop on it without discussing it somewhere first (python-ideas, maybe?).

----------
nosy: +jackdied, r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29621>
_______________________________________


More information about the Python-bugs-list mailing list