Adding and attribute to an instance

"Martin v. Löwis" martin at v.loewis.de
Wed Aug 10 04:01:04 EDT 2005


Gregory Bond wrote:
> Make sure you init this member to 0 (tp_init), and make sure you
> PyXDECREF() it when the object is deleted (tp_dealloc).

As this may cause your objects to appear in cycles, you may also
have to add support for cyclic GC (unless you already did this
before, and unless you can somehow rule out that your objects
are in cycles).

Regards,
Martin



More information about the Python-list mailing list