Re:Python's Type Checking Renaissance
by cstejerean on Wednesday January 27, 2021 @12:59AM
(#25924815)
That’s great news. Hopefully PEP 505 gets revised as well, which would make optional not only more ergonomic to declare but also more ergonomic to use.
Union is getting dedicated syntax in 3.10: https://www.python.org/dev/peps/pep-0604/
Optional could follow: https://www.python.org/dev/peps/pep-0645/