This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients eli.bendersky, eric.araujo, eric.smith, giampaolo.rodola, rhettinger, terry.reedy, xuanji
Date 2010-11-27.10:37:43
SpamBayes Score 9.065647e-10
Marked as misclassified No
Message-id <AANLkTimiD08yP4iN-GAsoJ8k6H1t6=UM6RHHnkHHO0e6@mail.gmail.com>
In-reply-to <1290853226.41.0.136666577598.issue10516@psf.upfronthosting.co.za>
Content
>
> Hi, I'm also looking at listobject.c also... if we want list.clear() to
> behave exactly like del list[], we may be able to just call list_ass_slice
> on the list. Similarly for list.copy which should behave like a=l[:]
>

Note that when executed to do 'del lst[:]' (i.e. with argument v set to 0
and ilow/ihigh to the maximal range of the list), list_ass_slice will just
call list_clear anyway, which is a cue that this indeed is the right way to
do it, despite the strange comment I mentioned in my message above.
Files
File name Uploaded
unnamed eli.bendersky, 2010-11-27.10:37:42
History
Date User Action Args
2010-11-27 10:37:45eli.benderskysetrecipients: + eli.bendersky, rhettinger, terry.reedy, eric.smith, giampaolo.rodola, eric.araujo, xuanji
2010-11-27 10:37:43eli.benderskylinkissue10516 messages
2010-11-27 10:37:43eli.benderskycreate