Ok, banning ru"..." and ur"..." altogether is fine too (assuming it's fine with the originators of the PEP).<br><br><div class="gmail_quote">On Sun, Jun 17, 2012 at 11:31 PM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Jun 18, 2012 at 3:59 PM, "Martin v. Löwis" <<a href="mailto:martin@v.loewis.de">martin@v.loewis.de</a>> wrote:<br>
> On 17.06.2012 22:41, Guido van Rossum wrote:<br>
>> Would it make sense to detect and reject these in 3.3 if the 2.7 syntax<br>
>> is used?<br>
><br>
> Maybe we are talking about different things: The (new) proposal is that<br>
> the ur prefix in 3.3 is a syntax error (again, as it was before PEP<br>
> 414). So, yes: the raw unicode literals will be rejected (not by<br>
> explicitly detecting them, though).<br>
<br>
</div></div>I think GvR was replying to my email where I was briefly reconsidering<br>
the idea of keeping them around (because the unicode_literals future<br>
import already suffers from this problem of literals that don't mean<br>
the same things in 2.x and in 3.x). However, that was flawed reasoning<br>
on my part - simply banning them altogether in 3.x is the simplest<br>
option to ensure this particular error doesn't pass silently,<br>
especially since there are alternate forward compatible ways to write<br>
them, such as:<br>
<div class="im"><br>
Python 2.7.3 (default, May 29 2012, 14:54:22)<br>
>>> from __future__ import unicode_literals<br>
</div>>>> print(u"\u03b3" r"\n")<br>
γ\n<br>
>>> print(u"\u03b3\\n")<br>
γ\n<br>
<br>
Python 3.3.0a4 (default:f1dd70bfb4c5, May 31 2012, 09:47:51)<br>
>>> print(u"\u03b3" r"\n")<br>
γ\n<br>
>>> print(u"\u03b3\\n")<br>
γ\n<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
Nick.<br>
<br>
--<br>
Nick Coghlan | <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a> | Brisbane, Australia<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>