Complexity of standard Python data structures
Marcus Alanen
marcus at infa.abo.fi
Mon Apr 14 16:27:48 EDT 2003
On Mon, 14 Apr 2003 14:04:57 -0400, Tim Peters <tim.one at comcast.net> wrote:
>If you want to clear a list,
>
> del list[:]
>
>is the usual way to spell it;
>
> list[:] = []
OK, that has slipped past me, thanks for clarifying. And it'll save
the bandwidth of one mail :)
>Note that it's not true that Python's list is really a vector/array -- the
>language doesn't define its implementation, and doesn't want to. It is true
Hmm. So the Python language is more about specifying _what_ will
happen, instead of _how_, with no concern for actual speed or memory?
Marcus
More information about the Python-list
mailing list