[Pyrex] weak references to Pyrex instances?

Jiba jibalamy at free.fr
Mon Oct 4 19:46:05 CEST 2004


On Mon, 04 Oct 2004 10:35:25 -0400
"Phillip J. Eby" <pje at telecommunity.com> wrote:

> At 12:13 AM 10/4/04 -0400, vng1 at mac.com wrote:
> >Hi all - what do I need to do to make a Pyrex class weak
> >reference-able?
> 
> Well, you can probably subclass it in Python and add:
> 
>      __slots__ = '__weakref__'

just subclassing (without adding the slot) works for me.

Jiba




More information about the Pyrex mailing list