Escape sequence "\xhh.." not yet implemented??

June Kim junaftnoon at nospamplzyahoo.com
Wed Nov 15 01:38:02 CET 2000


According to the current Python Reference Manual:
http://www.python.org/doc/current/ref/strings.html#l2h-17

[quote]
In strict compatibility with Standard C, up to three octal digits are
accepted, but an unlimited number of hex digits is taken to be part of the
hex escape (and then the lower 8 bits of the resulting hex number are used
in 8-bit implementations).
[end of quote]

The table just above that sentence also indicates obviously that "\x"
sequence can go on unlimitedly -- it is '\xhh...' implying
some-more-to-come.

However, to my disappointment, the current Python 2.0 final doesn't work
that way; it takes only two letters after \x just like old Python did.

>>> '\xA0A0'
'\240A0'

Is it a discordance btw the manual and the implementation, or my
misinterpretationt?

--
June

ps. btw, I don't understand the last bit in the parentheses.




More information about the Python-list mailing list