Guido van Rossum wrote: > The file pep_2777.py uses an encoding cookie that specifies UTF-8. > Unfortunately my toolchain doesn't know about this, and displays it as > Latin-1. Since the only UTF-8 is in 8-bit string literals (not > Unicode literals), wouldn't it make more sense to drop the encoding > cookie and use \xXX escapes in those literals? You could, but the whole point of PEP 263 is that the source code encoding is made explicit, so removing the cookie would defeat the purpose. Note that the cookie also implicitly tests the PEP 263 implementation. > I'm not even sure this > use is legal in phase 2 of PEP 263. It is: if you use non-UTF-8 string literals in that source file, the parser will raise an exception during compilation. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4