PEP263 (Specifying encoding) and bytecode strings

Martin v. Löwis martin at v.loewis.de
Mon May 5 17:36:28 EDT 2003


"Tony Meyer" <ta-meyer at ihug.co.nz> writes:

> Is there some way to specify that all strings are bytecodes, and not
> encoded characters?

Most certainly. Just use hex escapes (\xAB) in the source code,
instead of using non-ASCII bytes. Hex escapes are the *only* way to
denote bytes with ordinals >128 in Python.

Don't make it look like characters if it isn't characters.

Regards,
Martin




More information about the Python-list mailing list