Ville Vainio wrote:
> Fredrik Lundh wrote:
>>because Python already has a perfectly valid way to clear a list,
>>perhaps ?
>>
>>    del l[:]
> 
> 
> Ok. That's pretty non-obvious but now that I've seen it I'll probably
> remember it. I did a stupid "while l: l.pop()" loop myself.

Actually, it's in the Library Reference (that we keep under 
our pillows) section 2.3.6.4 Mutable Sequence Types.

         Cheers,        Mel.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to