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

None unification #1278

Closed
ddfisher opened this issue Mar 7, 2016 · 3 comments
Closed

None unification #1278

ddfisher opened this issue Mar 7, 2016 · 3 comments

Comments

@ddfisher
Copy link
Collaborator

ddfisher commented Mar 7, 2016

Currently, None types in the code either mean:

  • the internal Void type: a type that cannot be used
  • None: an uninhabited type (i.e. a type without any values)
  • the internal NoneTyp type: the type that contains only the value None (this cannot currently be explicitly specified)

After doing proper Optional checking, I propose that we make None types always mean NoneTyp. Optional checking will prevent functions that return None from being used in places they shouldn't, and allowing users to specify something is the uninhabited type isn't currently useful at all.

@ddfisher
Copy link
Collaborator Author

ddfisher commented Mar 8, 2016

Doing this should fix #299.

@gvanrossum
Copy link
Member

Marked as needs discussion since it would be good to understand the consequences more precisely.

@ilevkivskyi
Copy link
Member

There is no more Void, and None always means NoneTyp() so I think this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants