-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Having __del__ present in stubs is useful for a few reasons:
- A subclass that calls
super().__del__()would see a false positive if__del__is present in the base class at runtime but not in the stub - The documentation explicitly states that subclasses should call
super().__del__()if they override a__del__method. A type checker that wants to enforce this rule would need to know whether__del__exists in the base class.
See discussion in python/typeshed#10984.
AlexWaygood and srittau