
30 Mar
2022
30 Mar
'22
5:25 a.m.
The typing-related PEP 645 - which introduces the syntax `T?` to mean `Optional[T]` - only has a single substantial related commit in the PEPs repo - the commit introducing the PEP (in Nov 2020) - and no discussions thread that I can find (on typing-sig or elsewhere).
I'm personally quite interested in the potential capability to quickly signify `Optional[T]` since it is something I do a lot.
What is the status of this PEP? Deferred for now? Withdrawn in favor of `T|None` syntax?† Something else?
--
David Foster | Seattle, WA, USA
Contributor to TypedDict, mypy, and Python's typing system
† Through the grapevine I've been inferring that folks have been
gravitating toward the slightly-shorter `T|None` syntax to spell
`Optional[T]` in the meantime, and I even mention that spelling in my
own PEP 655 (Required[]) [1]
[1]: https://peps.python.org/pep-0655/#how-to-teach-this