You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that sm_callable/cm_callable fields are only initialized in the __init__ function and not all code (like the repr) handles the NULL case.
Additionally, even though __func__ isn't writable, you can modify it by calling __init__ on an already initialized staticmethod or classmethod.
Crash report
The following code crashes in a debug build:
Or equivalently:
The problem is that
sm_callable/cm_callablefields are only initialized in the__init__function and not all code (like the repr) handles the NULL case.Additionally, even though
__func__isn't writable, you can modify it by calling__init__on an already initialized staticmethod or classmethod.Linked PRs