Are you saying that with that future import, b"..." is still a Unicode literal?<br><br><div class="gmail_quote">On Thu, Dec 8, 2011 at 6:50 PM, Lennart Regebro <span dir="ltr"><<a href="mailto:regebro@gmail.com">regebro@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">"from future import unicode_literals" is my fault. I'm sorry. It's<br>
pretty useless. It was suggested by somebody and I then supported it's<br>
adding, instead of allowing u'' which I suggested. But it doesn't<br>
work.<br>
<br>
One reason is that you need to be able to say "This should be str in<br>
Python 2, and binary in Python 3, that should be Unicode in Python 2<br>
and str in Python 3, and that over there should be str in both<br>
versions", and the future import doesn't support that.<br>
<br>
Adding u'' support solves the problem, but then again, so does having<br>
a b() and an u() method. I'm not sure of the utility of adding<br>
functionality to Python 3 that can be solved with six.<br>
<span class="HOEnZb"><font color="#888888"><br>
//Lennart<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/guido%40python.org" target="_blank">http://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)<br>