<br><br><div class="gmail_quote">On Thu, Mar 20, 2008 at 9:28 AM, Lennart Regebro <<a href="mailto:regebro@gmail.com">regebro@gmail.com</a>> 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>
<<a href="mailto:charles.merriam@gmail.com">charles.merriam@gmail.com</a>> wrote:<br>
</div><div class="Ih2E3d">> The problem is not the gratuitous removal of the leading 'u', but the<br>
> subtle problems when<br>
> the code looks nearly identical. The most likely one to cause<br>
> problems is the new semantics<br>
> of the keys operations. While I haven't read the 3.0 code, this is<br>
> what was stated at Guido's<br>
> last talk.<br>
<br>
</div>No, the problem is the lack of u'' support. I've tried. :)<br>
</blockquote><div><br>That may be the case now, and with that particular code. It'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's just plain silly to discuss it.<br>
<br>What can be done is adding a future statement to 2.6 to make '' be identical to u'': 'from __future__ import unicode_strings' or such, but it doesn't remove the need to use 2to3. Really, use 2to3.<br>
<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't commonly done. Those types<br>
of problems is however completely unavoidable in any case, 2to3 won't<br>
solve them either, as I understand it.<br>
</blockquote><div><br>It'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 <<a href="mailto:thomas@python.org">thomas@python.org</a>><br>
<br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!