John Machin wrote: >> > Even less overhead: del var1[:] >> >> even less overhead: >> >> var1 = [] > > Firstly, your replacement is not functionally equivalent.
do you really have to tell me that? (as I said, if you rely on the difference, your design is probably flawed) > Secondly, it appears *NOT* to have less overhead: did you ask your fingers ;-) my benchmark told me it was faster, but that doesn't make sense, and I cannot repeat that test; I suspect I compared plain assignent to the assign-to-slice variant. or maybe I used a pre-Raymond version of Python... </F> -- http://mail.python.org/mailman/listinfo/python-list