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
{{ message }}
Repository navigation
Prefer __new__ over __init__ for determining callable type of a class #5647
#5642 made __new__ chosen in more situations but __init__ is still chosen when
one class defines both. The difficulty is that typeshed has a bunch of dodgy __new__
annotations that need to be cleaned up first.
Activity
hauntsaninja commentedon Feb 25, 2020
Here's an example (simplified from a post in the gitter today) where we get a terrible error message because IntEnum subclasses int.
Curious if you remember what the problematic typeshed
__new__s are?Fix __new__ and __init__ precedence
Fix __new__ and __init__ precedence
Fix __new__ and __init__ precedence
Fix __new__ and __init__ precedence