<br><br><div class="gmail_quote">On Thu, Mar 20, 2008 at 9:28 AM, Lennart Regebro &lt;<a href="mailto:regebro@gmail.com">regebro@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Thu, Mar 20, 2008 at 4:40 PM, Charles Merriam<br>
&lt;<a href="mailto:charles.merriam@gmail.com">charles.merriam@gmail.com</a>&gt; wrote:<br>
</div><div class="Ih2E3d">&gt; &nbsp;The problem is not the gratuitous removal of the leading &#39;u&#39;, but the<br>
&gt; &nbsp;subtle problems when<br>
&gt; &nbsp;the code looks nearly identical. &nbsp;The most likely one to cause<br>
&gt; &nbsp;problems is the new semantics<br>
&gt; &nbsp;of the keys operations. &nbsp; While I haven&#39;t read the 3.0 code, this is<br>
&gt; &nbsp;what was stated at Guido&#39;s<br>
&gt; &nbsp;last talk.<br>
<br>
</div>No, the problem is the lack of u&#39;&#39; support. I&#39;ve tried. :)<br>
</blockquote><div><br>That may be the case now, and with that particular code. It&#39;s still very fragile to *count* on this being true. Python 3.0 should not and must not have backward compatibility cruft. It defeats the whole point of 3.0 and devalues it to the point of uselessness. It&#39;s just plain silly to discuss it.<br>
<br>What can be done is adding a future statement to 2.6 to make &#39;&#39; be identical to u&#39;&#39;: &#39;from __future__ import unicode_strings&#39; or such, but it doesn&#39;t remove the need to use 2to3. Really, use 2to3.<br>
&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The new semantics of the keys operation means that keys() will work<br>
like iterkeys() works now. This is not a problem unless you try to use<br>
the result of keys() as a list, which isn&#39;t commonly done. Those types<br>
of problems is however completely unavoidable in any case, 2to3 won&#39;t<br>
solve them either, as I understand it.<br>
</blockquote><div><br>It&#39;ll do a much better job than try-and-pray. It may not matter in any of your code, but I really suggest not relying on it. Use 2to3.<br></div></div><br>-- <br>Thomas Wouters &lt;<a href="mailto:thomas@python.org">thomas@python.org</a>&gt;<br>
<br>Hi! I&#39;m a .signature virus! copy me into your .signature file to help me spread!