Skip to content

None unification #1278

Description

@ddfisher

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.

Activity

  1. ddfisher commented on Mar 8, 2016

    @ddfisher
    CollaboratorAuthor

    Doing this should fix #299.

  2. gvanrossum commented on Apr 8, 2016

    @gvanrossum
    Member

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

  3. added this to the milestone on Apr 8, 2016
  4. removed this from the milestone on Mar 29, 2017
  5. ilevkivskyi commented on Aug 31, 2019

    @ilevkivskyi
    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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions