Skip to content

Allow to alias None #9402

Closed
Closed
@Hibou57

Description

@Hibou57

🚀 Feature

Allow aliasing like T = None.

Pitch

None as a type on its own, generally does not make sense except as a singleton type and it is used for optional types, which is just an union including None. But in some corner case, None is not a proper name (ex. cases where Void or Null or Unit matches better) and would need to be aliased and will still be used like None is.

I don’t know if there is anything against it in any PEP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions