Skip to content
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

Disallow locally-generated types from escaping their function #4690

Open
msullivan opened this issue Mar 7, 2018 · 1 comment
Open

Disallow locally-generated types from escaping their function #4690

msullivan opened this issue Mar 7, 2018 · 1 comment
Labels
topic-runtime-semantics mypy doesn't model runtime semantics correctly topic-variable-scope

Comments

@msullivan
Copy link
Collaborator

We should ban locally generated types (such as NamedTuples declared inside of functions and types generated by uses of callable) from escaping the function where they are created.

It isn't really a good idea to do in the first place and it has difficult interactions with both coarse and finen-grained incremental.

@gvanrossum
Copy link
Member

gvanrossum commented Mar 7, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-runtime-semantics mypy doesn't model runtime semantics correctly topic-variable-scope
Projects
None yet
Development

No branches or pull requests

3 participants