[issue35544] unicode.encode docstring says return value can be unicode

radiocane report at bugs.python.org
Thu Dec 20 05:48:56 EST 2018


radiocane <bruno at anche.no> added the comment:

Given that:
1) No standard codec returns unicode
2) I consider as "most common scenario" the case where a user wants to encode a unicode object using some character encoding and get back an str-like object

I'll keep on finding "-> string or unicode" misleading. I'd rather have the same as str.encode i.e. "-> object".
Anyway thanks for your time and attention :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35544>
_______________________________________


More information about the Python-bugs-list mailing list