[Python-Dev] Supporting raw bytes data in urllib.parse.* (was Re: Polymorphic best practices)
glyph at twistedmatrix.com
Mon Sep 20 06:12:44 CEST 2010
On Sep 18, 2010, at 10:18 PM, Steve Holden wrote:
>> I could probably be persuaded to merge the APIs, but the email6
>> precedent suggests to me that separating the APIs better reflects the
>> mental model we're trying to encourage in programmers manipulating
>> text (i.e. the difference between the raw octet sequence and the text
>> character sequence/parsed data).
> That sounds pretty sane and coherent to me.
While I don't like the email6 precedent as such (that there would be different parsed objects, based on whether you started parsing with bytes or with strings), the idea that when you are working directly with bytes or text, you should have to know which one you have, is a good one. +1 for keeping the APIs separate with 'urlsplitb' etc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev