tuple weakref

Martin v. Löwis martin at v.loewis.de
Sun Apr 13 22:46:51 CEST 2003


Alex Martelli <aleax at aleax.it> writes:

> The simplest solution is to have pyRXP return a tree of *LISTS*,

Why is that a solution?

>>> x=[]
>>> import weakref
>>> weakref.ref(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: cannot create weak reference to 'list' object

Regards,
Martin




More information about the Python-list mailing list