Skip to content

Disallow assignment to None, False, True and __debug__ #137

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

Closed
JukkaL opened this issue Feb 12, 2013 · 3 comments
Closed

Disallow assignment to None, False, True and __debug__ #137

JukkaL opened this issue Feb 12, 2013 · 3 comments
Labels
bug mypy got something wrong

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Feb 12, 2013

The front end lets programs assign to None, False, True and __debug__, even though this is disallowed in Python. Disallow these assignments, similar to Python.

@Varriount
Copy link

This would be fixed by modifying the semantic analyzer, semanal.py , right? Specifically the assignment analysis function?

@JukkaL
Copy link
Collaborator Author

JukkaL commented Feb 18, 2013

Yes, that's correct.

And sorry for the late reply. I had a nasty cold last week.

@gvanrossum
Copy link
Member

This will be fixed with #1353.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

3 participants