comparing Unicode and string

John Machin sjmachin at lexicon.net
Fri Nov 10 03:02:55 CET 2006


Neil Cerutti wrote:
> On 2006-10-16, luc.saffre at gmail.com <luc.saffre at gmail.com> wrote:
> > Hello,
> >
> > here is something that surprises me.
> >
> >   #coding: iso-8859-1
>
> I think that's supposed to be:
>
> # -*- coding: iso-8859-1 -*-
>

Not quite. As PEP 263 says:

"""
More precisely, the first or second line must match the regular
expression "coding[:=]\s*([-\w.]+)". 
"""




More information about the Python-list mailing list