<br><br><div><span class="gmail_quote">On 1/2/07, <b class="gmail_sendername">Barry Warsaw</b> &lt;<a href="mailto:barry@python.org">barry@python.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>On Jan 2, 2007, at 7:52 PM, Brett Cannon wrote:<br><br>&gt;&gt; base64 and quopri implement specific RFCs so I think they should<br>&gt;&gt; stay.&nbsp;&nbsp;uu implements a defacto standard, but I don&#39;t like its
<br>&gt;&gt; interface (it uses file-like objects instead of strings).&nbsp;&nbsp;For Py3K,<br>&gt;&gt; I would be in favor of consolidating things, making interfaces<br>&gt;&gt; consistent, and probably re-homing the modules under a top-level
<br>&gt;&gt; package.<br>&gt;<br>&gt; But isn&#39;t that what the codecs module is for?&nbsp;&nbsp;If cleaning up the<br>&gt; API is<br>&gt; going to happen shouldn&#39;t be to add whatever encoders/decoders that<br>&gt; codecs<br>
&gt; is missing to replace these modules?<br><br>IMO, no.&nbsp;&nbsp;The &quot;problem&quot; with the codecs is that it doesn&#39;t seem like<br>a natural interface for doing these kinds of conversions.&nbsp;&nbsp;One<br>problem is documentation: if I want to base64 encode some bytes with
<br>an alternate alphabet and the only hammer I&#39;ve got is the codecs<br>module, how do I find out about this hammer and where do I go for<br>(specifically the base64 semantics) documentation?&nbsp;&nbsp;Or let&#39;s say I<br>want to base32 encode some byte but I want to fold the case and map 0
<br>and 1 to an alternative alphabet.&nbsp;&nbsp;How do I pass that into the<br>codec?&nbsp;&nbsp;Finally, the codecs tend to take strings as arguments so if I<br>misspell &quot;base63&quot; I&#39;m going to get a lookup error which is much more
<br>confusing than the name or attribute error (&quot;hmm, maybe my distro<br>didn&#39;t package up all the codecs&quot;).</blockquote><div><br><br>It sounds like codecs needs a little lovin&#39;.&nbsp; The thing has been around since Python 
2.0 which is before my time on python-dev so I don&#39;t know anything about its design.&nbsp; But I would assume it is going to get used a lot more come Py3K for Unicode conversion.&nbsp; Maybe some of your and Anthony&#39;s issues can be addressed so that at least some point in the future we can transition people over to a common setup for encodings and off of base64 and such (but it won&#39;t be Python 
3.0).<br><br>-Brett<br></div></div>