[issue17339] bytes() TypeError message is misleadingly narrow

Ezio Melotti report at bugs.python.org
Mon Mar 4 17:43:40 CET 2013


Ezio Melotti added the comment:

> 'object' object cannot be converted to bytes

This is not entirely accurate for the bytes(int) case though, since it's not converting the int to bytes.  OTOH if we want to keep the message short we have to make compromises about accuracy and completeness.

----------

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


More information about the Python-bugs-list mailing list