On 15 October 2012 01:35, MRAB <python@mrabarnett.plus.com> wrote:
On 2012-10-15 01:12, Joshua Landau wrote:
On 15 October 2012 00:46, MRAB <python@mrabarnett.plus.com
<mailto:python@mrabarnett.plus.com>> wrote:

    OK, but what about raw string literals? Currently, "\\u0190" ==
    r"\u0190", but "\\u0190" != r"Ɛ".


The “r"” prefix escapes all escapes, so will escape this escape too.
Hence, this behaviour is un...escaped ;).

If "\u0190" becomes "Ɛ", what happens to "\u000A"? Currently it's
legal. :-)

The python interpreter could distinguish between its morphed Unicode escapes and the originals - the escapes would never match against already-syntactically-relevant constructs*. Hence "a \u0069s b" is equivalent to "a i\u0073 b" but not "a is b": the first two are defined by __op_is__ and the last is just the "is" keyword.

Hence, \u000A would just act like a character, and be definable as an operator, and have little to do with the newline character.

Nice try, but the proposal stands firm.

* Except, of course, the old operators which will be phased into the new mechanism.