On 05.10.2016 11:20, Stephen J. Turnbull wrote:
Eg, there's no question in my mind that
for i in range(m):
for j in range (n):
for k in range (p):
m_out(i, k) += m_in1(i, j) * m_in2(j, k)
is easier to read[1] than
for i in range(m) for j in range (n) for k in range (p):
m_out(i, k) += m_in1(i, j) * m_in2(j, k)
despite costing two lines and two levels of indentation. YMMV, of
course, but I suspect most senior devs will disagree with you.
I agree with you on this when it comes to long-living production code.
For small scripts this is still useful. Not everybody writes huge
programs, which needs to adhere to style guides and QA.
Cheers,
Sven
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/