23 Nov
2018
23 Nov
'18
4:30 p.m.
where `assert_never` is as discussed in https://github.com/python/mypy/issues/5818.
I think it makes sense to discuss this use case with assert_never in the PEP
Of course, I would prefer to keep using Enums. That would require the type checker to consider `Status` similarly to `Literal[Status.Started, Status.Finished]`.
Yes, I think an enum should be equivalent to union of all its values. IIRC this is already required by PEP 484, but was never implemented. We cab re-emphasize it in this PEP. -- Ivan