Terry Reedy wrote:
I believe that CPython function objects must currently all have the same size or at least the same max size and conclude that CPython currently allocates them from a block of memory that is some multiple of that size.
I wouldn't be surprised if there is a free list for function objects, which would make it even more likely that you would observe this kind of re-use. -- Greg -- https://mail.python.org/mailman/listinfo/python-list