[Pyrex] weak references to Pyrex instances?

vng1 at mac.com vng1 at mac.com
Mon Oct 4 16:57:31 CEST 2004


Oh.

That's really obvious now that you point it out.    :)

I just tried it out and it works fine.

thanks!
vic

---
Don't be humble ... you're not that great.    -- Golda Meir

On 4-Oct-04, at 10:35 AM, Phillip J. Eby 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__'
>
> in the subclass, which will tell Python to make it weak referenceable. 
>  At least it works for other types.
>
> I don't know for sure if it works with Pyrex, nor do I know a better 
> way to do it with Pyrex.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3901 bytes
Desc: not available
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20041004/9660e1a3/smime.bin


More information about the Pyrex mailing list