[Tutor] close, but no cigar

Alan Gauld alan.gauld at btinternet.com
Tue Jul 23 01:31:23 CEST 2013


On 22/07/13 23:22, Jim Mooney wrote:

> # -*- coding: utf-8 -*-
>
> Will that always work? Setting coding in a comment? Or am I looking at a
> Linux hash line?

Same concept.
It's a special comment that will only take effect when at the top of a file.

Actually, I'm not sure how it plays with the hash-bang line - I assume 
being the second line is OK too...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list