Improve typing. Replace Optional[T] with T?

I haven’t found any related topic about this idea. Sorry if I duplicate this. In my mind syntactically type annotation a: int? looks much better than a: Optional[int]. With new Union feature it looks generally awesome a: int? | str | list

PEP 645. I suspect discussion is on the typing-sig mailing list.

Thread on typing-sig: https://mail.python.org/archives/list/typing-sig@python.org/thread/SWAY6V7WZLVPGYQEMHXJROT2747OXSRX/

1 Like

Thanks a lot)