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
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.
Having
__del__
present in stubs is useful for a few reasons:super().__del__()
would see a false positive if__del__
is present in the base class at runtime but not in the stubsuper().__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.
The text was updated successfully, but these errors were encountered: