R. David Murray <rdmur...@bitdance.com> added the comment:

Yes, if that protocol existed the errors would be clearer.  But it doesn't, for 
historical reasons, and that is unlikely to change.

You are welcome to submit an enhancement request to make quopri accept string 
as an argument when decoding.  But when encoding, it must produce bytes, 
because "ASCII" is a *byte* encoding, not a unicode encoding (unicode is ascii 
compatible, but it is neither ascii nor bytes).  You might have to write the PR 
yourself, I'm not sure if anyone else will be interested (but some of the 
people on the core-mentorship mailing list might be).

StringIO is specifically designed to only operate on strings.  If you want to 
decode the bytes you feed it, you have to do that.  This is an intentional 
design.

Further discussion of ways to improve the situation should move to the 
python-idea mailing list.  There's really nothing to do here from a bug tracker 
perspective, unless you want to open an enhancement request as mentioned above.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32268>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to