[Pyrex] status of weakref support?

Yann Vernier yann at donkey.dyndns.org
Sun Dec 12 20:49:09 CET 2004


On Sun, Dec 12, 2004 at 10:28:47AM -0800, Lenard Lindstrom wrote:
> On Sat, 11 Dec 2004 20:36:48 +0100 Martijn Faassen <faassen at infrae.com> wrote:
> > class Element(ElementBase):
> >      __slots__ = ['__weakref__']

> > What's the thinking on what this mechanism should look like in Pyrex?

> That would depend on whether or not weak referencing is available by
> default. The thread did not include a final decision. If optional maybe:
> 
> cdef class C:
>     cdef object weakref
> 
> Telling Pyrex to omit weak referencing when provided by default might
> require some new syntax, a pragma keyword or something.

To me it seems like it should rather be:

cdef class C:
    cdef public object weakref

since the weakref slot should be accessible from Python without knowing
the Pyrex type. 

-- 
PGP fingerprint = 9242 DC15 2502 FEAB E15F  84C6 D538 EC09 5380 5746
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20041212/9570c866/attachment.bin


More information about the Pyrex mailing list