[Python-Dev] Proposal to eliminate PySet_Fini

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Jun 27 20:09:19 CEST 2006

Setobject code allocates several internal objects on the heap that are
cleaned up by the PySet_Fini function.  This is a fine design choice,
but it often makes debugging applications with embedded python more

I propose to eliminate the need for PySet_Fini as follows:

1. Make dummy and emptyfrozenset static objects similar to Py_None
2. Eliminate the free sets reuse scheme.

The second proposal is probably more controversial, but is there any
real benefit from that scheme when pymalloc is enabled?

More information about the Python-Dev mailing list