fredrik at pythonware.com
Sun Dec 12 22:13:51 CET 2004
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...
More information about the Python-list