Message123723
> That's good if it's so... can you explain why list_clear doesn't
> guarantee that the list is empty? Why would XDECREF populate the list?
> I don't quite understand it.
Does this mean that durning the Py_DECREF progress the list may be populated again? It's not a problem. Here is the simplest example(with applying eli's patch):
class A(object):
def __init__(self, li):
self._li = li
def __del__(self):
self._li.append(self)
li = []
li.append(A(li))
li.clear()
print(li) |
|
Date |
User |
Action |
Args |
2010-12-10 10:12:41 | ysj.ray | set | recipients:
+ ysj.ray, georg.brandl, rhettinger, terry.reedy, eric.smith, giampaolo.rodola, eric.araujo, Retro, eli.bendersky, brian.curtin, xuanji |
2010-12-10 10:12:41 | ysj.ray | set | messageid: <1291975961.57.0.14569745626.issue10516@psf.upfronthosting.co.za> |
2010-12-10 10:12:39 | ysj.ray | link | issue10516 messages |
2010-12-10 10:12:39 | ysj.ray | create | |
|