Message117719
| Author |
vstinner |
| Recipients |
eric.araujo, eric.smith, ncoghlan, pitrou, r.david.murray, vstinner |
| Date |
2010年09月30日.10:59:29 |
| SpamBayes Score |
3.5364653e-06 |
| Marked as misclassified |
No |
| Message-id |
<1285844371.34.0.555090920821.issue9873@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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. |
|