Conditional iteration

at at at tuko.nl
Thu Dec 14 02:11:28 EST 2006


Hi Greg,

Well point is that the condition is the only thing happening and does not
really apply to the indented code section, but basically to the list used
in the indented code section.

When I read this code back its like, 'oh we use this list' and by the if
some_condition the next thing I think is 'hm, not all of the list' and even
worse should I worry if more restrictions can be found when I read
further...

All the best,

@

greg wrote:

> at wrote:
> 
>> It is not the addional line containing 'if x > 0:' that bothers me, but
>> the additional indentation.
> 
> I don't find the additional indentation bothersome.
> In fact I think it's helpful, because it makes it
> obvious that there is something else going on besides
> just a loop.
> 
> --
> Greg




More information about the Python-list mailing list