Assign allocation function directly to tp_new.
This fixes infinite recursion bugs when C extensions inherit from these built-in types where the C extension allocation function calls the base tp_new, which does an attribute lookup, which finds the C extension allocation function again.
Showing
Please register or sign in to comment