[issue36582] collections.UserString encode method returns a string

Daniel Fortunov report at bugs.python.org
Mon May 6 17:23:42 EDT 2019


Daniel Fortunov <pythonbugs at danielfortunov.com> added the comment:

PR submitted here:
https://github.com/python/cpython/pull/13138

Rather than adding three different tests for the different code paths I chose to collapse the three different code paths by surfacing the underlying str.encode() defaults in the method signature of UserString.encode(), taking it down to a one-line implementation.

@xtreak: Thanks for the super-helpful triage and failing test case!

----------

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


More information about the Python-bugs-list mailing list