8000 None unification · Issue #1278 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content
None unification #1278
Closed
Closed
@ddfisher

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0