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

After thinking about it, I'm inclined to reject this and say that quopri should 
be fixed to reject string input to decode.  On python-dev Guido opined that a 
kind of polymorphism in the stdlib was good (bytes in --> bytes out, string in 
--> string out).  string in --> bytes out and bytes in --> string out was 
considered bad, to my understanding (except for unicode encode/decode, of 
course).

As you say, all one has to do is encode the string as ascii to get the bytes to 
pass in.  It is better, I think, to maintain the clear distinction between 
bytes and strings in the programmers mind.  That's what Python3 is all about, 
really.

As for "the whole point of base64 is to safely encode binary data into text 
characters", that is not true.  The point is to encode binary data into a 
subset of *ascii*, which is *not* text, it is bytes.  The fact that this is 
also useful for transferring binary data through unicode is pretty much an 
unintended consequence of the way unicode is designed.

----------
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> pending
type: behavior -> feature request

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

Reply via email to