Chris Angelico, 15.07.2011 10:06:
2011/7/15 Björn Lindqvist:
Pre and post-increments are
almost always confusing unless they are used as the counter-variable
inside for-loops.

I agree that they're often confusing (i+++++j) but there are several
places where they're handy.

array[count++]=value;

or the more direct pointer management:

*ptr++=value;

More direct, sure. But readable? Well, only when you know what this specific pattern does. If you have to think about it, it may end up hurting your eyes before you figure it out.

Stefan

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to