Repository navigation
Conversation
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
|
In what situations would it return a module? The PEP only says it return a |
|
Yeah, it can return a regular module if lazy imports are disabled. More generally, it can return anything at all if you manually put something in sys.modules, or if there's an import hook doing funny things. Therefore, there's an argument that the return type should be Should we change the return type to |
|
@JelleZijlstra That's an interesting take. It reminds me of a quote by wise Tim Peters re metaclasses (see here):
It feels applicable to any "advanced" language feature, really. If you're using I guess I disagree with you then, because the people using |
closes #16747