Message385134
Jumping in here to explain why '__class' doesn't crash when '__sizeof__' does:
When '__class__' is fetched, it returns a new reference to the object's type.
When '__sizeof__' is fetched on the otherhand, a new object is allocated on the heap ('types.MethodType') and is returned to the caller.
This object also has a '__sizeof__' that does the same (as it's implemented on 'object'.
So yes, you are exhausting the C runtime stack by de-allocating over a THOUSAND objects.
You can see this happen by watching the memory usage of Python steadily climb. |
|
Date |
User |
Action |
Args |
2021-01-16 04:25:41 | WildCard65 | set | recipients:
+ WildCard65, terry.reedy, ronaldoussoren, christian.heimes, xxm |
2021-01-16 04:25:41 | WildCard65 | set | messageid: <1610771141.49.0.237009457684.issue42887@roundup.psfhosted.org> |
2021-01-16 04:25:41 | WildCard65 | link | issue42887 messages |
2021-01-16 04:25:41 | WildCard65 | create | |
|