which is more 'pythonic' / 'better' ?

Terry Reedy tjreedy at udel.edu
Mon Sep 12 21:36:16 EDT 2005


"Will McGugan" <news at NOwillmcguganSPAM.com> wrote in message 
news:4325a3fe$0$525$da0feed9 at news.zen.co.uk...
> You may be right. I always use plural nouns for collections.

ditto
> To me 'line' would suggest there was just one of them,
> so I assumed it was string.

I did too.

for line in file('skljflask.txt',r): # or similar

is a common idiom posted here many times.

Terry J. Reedy






More information about the Python-list mailing list