[Pyrex] weak references to Pyrex instances?

Michael P. Dubner pywebmail at list.ru
Sun Oct 10 01:33:32 CEST 2004


Lenard Lindstrom wrote:
>On Tue, 05 Oct 2004 14:37:19 +1300 Greg Ewing <greg at cosc.canterbury.ac.nz> wrote:
>
>>Phillip J. Eby" <pje at telecommunity.com>:
>>
>>>ell, you can probably subclass it in Python and add:
>>>
>>>     __slots__ = '__weakref__'
>>>
>>>I don't know for sure if it works with Pyrex, nor do I know a better way to 
>>>do it with Pyrex.
>>>      
>>>
>>Adding weakref support is on my todo list, but I haven't got
>>around to it yet.
>>
>>Also, I haven't decided whether all extension types should
>>be weak referenceable automatically, or whether it should
>>be an option. Any thoughts on that from people?
>>
>>    
>>
>Make weak referencing optional as it is with __slots__.
>  
>
Surely. In that usage cases where it's doesn't matter overhead of typing
isn't very hard, but when it's matters - it's matters.
Also compatibility with Python code is Good Thing. (I.e. when
preprocessing to Python/Pyrex code :-) )

--
Best regards,
Michael Dubner (dubnerm.at.mindless.com)
PS: Sorry for my English




More information about the Pyrex mailing list