Sion Arrowsmith wrote:
> Daniel Dittmar  <[EMAIL PROTECTED]> wrote:
>>         if line [:1] == '#':
> 
> What's wrong with line[0] == '#' ? (For one thing, it's fractionally
> faster than [:1].)
> 

Matter of taste. Occasionally, I use line iterators that strip the '\n' 
from the end of each line, so empty lines have to be handled. Of course, 
in my example code, one could have moved the check for the empty line 
before the check for the comment.

Daniel
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to