[Python-Dev] PEP 263 -- Python Source Code Encoding

Skip Montanaro skip@pobox.com
2002年2月27日 11:20:51 -0600


 >> 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...
Skip

AltStyle によって変換されたページ (->オリジナル) /