[Raymond Hettinger]
>> the current idiom:
>>
>>    mylist[:] = []       # clear

[Fred L. Drake, Jr.]
> Unless you happen to prefer the other current idiom:
>
>    del mylist[:]

Or my personal favorite,

    while mylist:
        del mylist[::2]

Then the original index positions with the most consecutive trailing 1
bits survive the longest, which is important to avoid ZODB cache bugs
<wink>.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to