which is more 'pythonic' / 'better' ?

gabor gabor at nekomancer.net
Tue Sep 13 02:54:04 EDT 2005


Terry Reedy wrote:
> "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.
> 

i'm sorry ;) it was  a list of strings...

the code was something like:

for line in open('x.y'):
	line = line.split('\t')


a better naming would be better it seems :)

gabor



More information about the Python-list mailing list