On 8/4/06, <b class="gmail_sendername">Ralf Schmitt</b> <<a href="mailto:ralf@brainbot.com">ralf@brainbot.com</a>> 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>><br>> I like the exception that 2.5 raises. I only wish it raised by default<br>> when using 'ascii' and u'ascii' as keys in the same dictionary. ;) Oh,<br>> and that str and unicode did not hash like they do. ;)
<br><br>No problem:<br><br> >>> import sys<br> >>> reload(sys)<br><module 'sys' (built-in)><br> >>> sys.setdefaultencoding("base64")<br> >>> "a"==u"a"
<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 "reload(sys)" 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>