The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

Mark Lawrence breamoreboy at yahoo.co.uk
Thu Mar 24 10:51:32 EDT 2016


On 24/03/2016 14:22, Matt Wheeler wrote:
>
> The point is that one can just do `mylist.clear()`
>

Only in 3.3 and up.  In Python 2.x you have to do it the old fashioned, 
long winded way.

mylist[:] = []

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list