Proposal: require 7-bit source str's

"Martin v. Löwis" martin at v.loewis.de
Fri Aug 6 04:39:51 EDT 2004


Hallvard B Furuseth wrote:
> Well, I don't think that's better, but if it's rejected for Python
> that'll be my next stop.

I can see how the global warning is provided (which then can be 
configured into an error through the warnings module). However,
I don't want to introduce additional magic comments. I already
dislike the coding declarations for being comments, and would
have preferred if they had been spelled as

directive encoding "utf-8"

The coding declaration was only acceptable because
- a statement would have to go before the doc string, in
   which case it would not have been a docstring anymore, and
- there was prior art (Emacs and VIM) for declaring encodings
   to editors, inside comments

Your proposed annotation has no prior art. As it has
effects on the syntax of the language, it should not be in
a comment.

Regards,
Martin



More information about the Python-list mailing list