On 8/4/06, <b class="gmail_sendername">Ralf Schmitt</b> &lt;<a href="mailto:ralf@brainbot.com">ralf@brainbot.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jean-Paul Calderone wrote:<br>&gt;<br>&gt; I like the exception that 2.5 raises.&nbsp;&nbsp;I only wish it raised by default<br>&gt; when using 'ascii' and u'ascii' as keys in the same dictionary. ;)&nbsp;&nbsp;Oh,<br>&gt; and that str and unicode did not hash like they do.&nbsp;&nbsp;;)
<br><br>No problem:<br><br> &gt;&gt;&gt; import sys<br> &gt;&gt;&gt; reload(sys)<br>&lt;module 'sys' (built-in)&gt;<br> &gt;&gt;&gt; sys.setdefaultencoding(&quot;base64&quot;)<br> &gt;&gt;&gt; &quot;a&quot;==u&quot;a&quot;
<br>Traceback (most recent call last):<br>...<br>binascii.Error: Incorrect padding<br><br><br>Maybe this is all just a matter of choosing the right defaultencoding ? :)</blockquote><div><br><br>Doing this is amazingly stupid. I can't believe how often I hear this suggestion. Apparently the fact that you have to &quot;reload(sys)&quot; to do it isn't warning enough?
<br></div></div><br>-- <br>Christopher Armstrong<br>International Man of Twistery<br><a href="http://radix.twistedmatrix.com/">http://radix.twistedmatrix.com/</a><br><a href="http://twistedmatrix.com/">http://twistedmatrix.com/
</a><br><a href="http://canonical.com/">http://canonical.com/</a><br>