Skip Montanaro wrote:
>> Python uses the 7-bit ASCII character set for program text and string >> literals. 8-bit characters may be used in string literals and >> comments but their interpretation is platform dependent; the proper >> way to insert 8-bit characters in string literals is by using octal >> or hexadecimal escape sequences.
mal> It's a fact of life that users don't read reference manuals, but mal> simply write programs and feel good if they happen to work :-)
Perhaps a warning should be emitted by the compiler if a plain string literal is found that contains 8-bit characters. Better yet, perhaps Neal can add this to PyChecker if he hasn't already...
Not yet, but I've been watching this issue as well as string interpolation. Whenever a final direction is decided, I will update checker to warn about potential problems. Neal