which is more 'pythonic' / 'better' ?

Will McGugan news at NOwillmcguganSPAM.com
Mon Sep 12 11:51:25 EDT 2005


Steve Holden wrote:

> I'd say it's much more likely that line is a list of lines, since it 
> seems improbable that absence of a character should cause a value of 
> "nothing" to be required.

You may be right. I always use plural nouns for collections. To me 
'line' would suggest there was just one of them, so I assumed it was string.


Will McGugan
-- 
http://www.willmcgugan.com
"".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in 
"jvyy*jvyyzpthtna^pbz")



More information about the Python-list mailing list