[issue24019] str/unicode encoding kwarg causes exceptions

Serhiy Storchaka report at bugs.python.org
Wed Apr 22 08:44:08 CEST 2015


Serhiy Storchaka added the comment:

Please don't deprecate the encoding parameter in str. It has a use case. str constructor works with any bytes-like objects, even with these that don't have the decode method. It raises more appropriate TypeError instead of AttributeError, so often you don't need to wrap an error.

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list