3 ms·
"for node in nodes" implies you are returning the node itself and not simply a counter. This would seem to fall more under his 1 word for loop variables idea.
by mudetroit 15y ago
"for node in nodes" implies you are returning the node itself and not simply a counter. This would seem to fall more under his 1 word for loop variables idea.
* NB: I am not certain whether I agree with such rules or not, but that is another discussion point.
- mattdeboard 15y agoYou must be a functional programmer :) My specific example was Python-related; but yes, if I'm using a functional language (or comprehensions in Python) I'm much more inclined to just use i/j/k/x as the counter. But for loops in Python don't return anything of course except in `break` cases.