20 Oct
2009
20 Oct
'09
10:39 a.m.
On 20 Oct 2009, at 01:06 , Steven D'Aprano wrote:
If your "anonymous code block" is more complicated than a single short expression, it's too complicated to be "obviously correct" just from looking at it, and so it should be documented and tested.
I have the same issue with this as with Oleg's pronouncement (which runs along the same lines): does that mean you never write for or if statements with more than a single line in them? Yet these are also "anonymous code blocks" which you say here are "too complicated to be obviously correct just from looking at [them]". If that's the case, why should compound statements even be allowed? They're breeding grounds for multiline anonymous blocks of codeā¦