Peter Hansen wrote:
I believe it's here: http://docs.python.org/lib/module-weakref.html
if you search for the string "Not all" and read the next two
paragraphs.

On the other hand, it says (there) only that "several builtin
types such as list and dict ... can add support through
subclassing", and does not say anything about int, str, etc...

Ahh, thanks for the help. I guess there are at least two solutions to the OP's problem then:


(1) Document that str and subclasses of str can't be weakreffed (easy)
(2) Change str so that it (or at least its subclasses) can be weakreffed (hard)


Probably either way a feature request should be filed.

STeVe
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to