Message122513
Objects/listobject.c has a static function named list_clear used internally. Is it possible to just expose this function as a clear() method?
One problem is that it has this strange comment in the end:
/* Never fails; the return value can be ignored.
Note that there is no guarantee that the list is actually empty
at this point, because XDECREF may have populated it again! */
However, looking at the code I'm not sure the list can be cleared any more than the function does, and it actually deallocates the ob_item field of the list. |
|
Date |
User |
Action |
Args |
2010-11-27 10:09:03 | eli.bendersky | set | recipients:
+ eli.bendersky, rhettinger, terry.reedy, eric.smith, giampaolo.rodola, eric.araujo |
2010-11-27 10:09:03 | eli.bendersky | set | messageid: <1290852543.2.0.914201704126.issue10516@psf.upfronthosting.co.za> |
2010-11-27 10:09:01 | eli.bendersky | link | issue10516 messages |
2010-11-27 10:09:01 | eli.bendersky | create | |
|