STINNER Victor <victor.stin...@haypocalc.com> added the comment:

> Option 2 (the alternative Antoine suggested and I'm considering):
> - "decode" ... to str ...
> - ... objects are "encoded" back to actual bytes before 
>   they are returned

In this case, you have to be very careful to not mix str and bytes decoded to 
str using a pseudo-encoding. Dummy example: urljoin('unicode', b'bytes') should 
raise an error.

I don't care of the internals if you write tests to ensure that it is not 
possible to mix str and bytes with the public API.

----------

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

Reply via email to