-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we make built-in classes special? #49
Comments
It sound reasonable to have something for this. It should only be used in stubs I think. I don't think we should try to guess which built-in types are compatible for MI (nobody uses this anyway). Maybe name it |
We (me, Mark Shannon and Andrey Vlasovskikh) discussed this yesterday and didn't consider this as an essential feature. |
Should this be postponed? Mypy no longer uses the |
I'm closing this issue. We decided that it would be better to add understanding of |
Mypy allows marking some classes as 'built-in' in stubs, since these classes (C classes in CPython) are semantically different from ordinary classes. For example, multiple inheritance is different:
Mypy uses the
typing.builtinclass
decorator for this. Here's a simplified example from mypy stubs for builtins:Here are some questions:
The text was updated successfully, but these errors were encountered: