compile(unicode) & source encoding

Just just at
Fri Nov 28 19:17:53 CET 2003

In article <mailman.1180.1070041213.702.python-list at>,
 "Denis S. Otkidach" <ods at> wrote:

> 2. Why there is now option to define encoding of source passed to
> compile function?  Yes, I can define encoding by prefixing my
> code with '# -*- coding: %s -*-\n' % encoding, but it's not
> handy.

You can just pass a unicode string (in 2.3 at least), so you can do the 
decoding yourself.


More information about the Python-list mailing list