CSV with comments
Steve Holden
steve at holdenweb.com
Wed Jul 19 09:47:13 EDT 2006
Sion Arrowsmith wrote:
> Daniel Dittmar <daniel.dittmar at sap.corp> wrote:
>
>> if line [:1] == '#':
>
>
> What's wrong with line[0] == '#' ? (For one thing, it's fractionally
> faster than [:1].)
>
>
For that matter, what's wrong with
line.startswith('#')
which expresses the intent rather better as well.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list