Re:Writing clean, testable, high quality code in Python
by hessenwolf on Wednesday December 29, 2010 @05:23AM
(#2048424)
Is that last list comprehension really much better though, keeping in mind that most of us code in several languages, and might be predominantly context experts rather than coders at the same time?
x = []
for i in k:
x.extend(len(i))
is really, really easy for me to understand instantly, if I have just been writing an actuarial model using R, c++, c#, vba, sql, html, css and python for the day, which I have.
x = [] for i in k: x.extend(len(i))
is really, really easy for me to understand instantly, if I have just been writing an actuarial model using R, c++, c#, vba, sql, html, css and python for the day, which I have.
Shortness is not always conciseness, methinks.