27 Feb
2002
27 Feb
'02
4:52 a.m.
So how about this:
In phase 1, the tokenizer checks the *complete file* for non-ASCII characters and outputs single warning per file if it doesn't find a coding declaration at the top. Unicode literals continue to use [raw-]unicode-escape as codec.
In phase 2, we enforce ASCII as default encoding, i.e. the warning will turn into an error. The [raw-]unicode-escape codec will be extended to also support converting Unicode to Unicode, that is, only handle escape sequences in this case.
+1. --Guido van Rossum (home page: http://www.python.org/~guido/)