azrael wrote: > I know that. enumerate is a great function. But this way it always > adds some complexity. I think that it is more better to give a man a > better tool then to let him play with a not so good one. People like > Python because of his simplicity in comparison with c++. Maybe People > would like him even more it would be a bit more simple but the same > powerfull.
But the added complexity of your approach of setting an attribute at runtime that can - add arbitrary costs (who knows that setting the attribute might not invoke a RPC-call?) for *every* enumeration of a list - conflict with multithreaded access or even only cartesian products of the same list of objects, rendering it simply useless is *less* hassle than putting a simple enumerate in place, just when needed? You sure have an interesting view of complexity. Not exactly text-book-based though. Diez -- http://mail.python.org/mailman/listinfo/python-list