PythonTidy

Roberto Bonvallet Roberto.Bonvallet at cern.ch
Thu Nov 30 14:42:34 CET 2006


Laurent Pointal wrote:
> ...
>> # vim: set fileencoding=utf-8 :
> ...
>> # -*- coding: utf-8 -*-
> ...
> 
> This is not "emacs-style", this is Python normalized source encoding
> directive for correct interpretation of u"..." strings by Python
> interpreter.
> 
> See http://www.python.org/dev/peps/pep-0263/

The -*- syntax is emacs-style.  The encoding directive is anything that
matches r"coding[=:]\s*([-\w.]+)".  The docs recommend to use either
emacs-style or vim-style.  See http://docs.python.org/ref/encodings.html

Cheers,
-- 
Roberto Bonvallet



More information about the Python-list mailing list