On Tuesday, August 7, 2012 9:52:59 AM UTC-4, Steven D'Aprano wrote: > In general, you should avoid non-idempotent code. You should > doubly avoid it during imports, and triply avoid it on days ending with Y.
I don't understand your aversion to non-idempotent code as a general rule. Most code is non-idempotent. Surely you're not saying we should never write: >>> foo += 1 or >>> my_list.pop() ??? Making top-level module code idempotent, I can understand (given this new-found revelation that modules aren't really singletons), but you seem to be arguing something stronger and more general. -- http://mail.python.org/mailman/listinfo/python-list