[Python-Dev] String methods... finally
tim_one at email.msn.com
Wed Jun 16 06:02:46 CEST 1999
> Do we have agreement on escapes like \xDDDD?
I think we have to agree to leave that alone -- it affects what e.g. the
regular expression parser does too.
> Should \uDDDD be added?
Yes, but only in string literals. You don't want to be within 10 miles of
Barry if you tell him that Emacs pymode has to treat the Unicode escape for
a newline as if it were-- as Java treats it outside literals --an actual
line break <0.01 wink>.
> The \u escape takes up to 4 bytes
Not in Java: it requires exactly 4 hex characters after == exactly 2 bytes,
and it's an error if it's followed by fewer than 4 hex characters. That's a
good rule (simple!), while ANSI C's is too clumsy to live with if people
want to take Unicode seriously.
So what does it mean for a Unicode escape to appear in a non-L string?
aha-the-secret-escape-to-ucs4<wink>-ly y'rs - tim
More information about the Python-Dev