
On Aug 30, 2019, at 18:40, Pasha Stetsenko <stpasha@gmail.com> wrote:
I can’t think of any uses other than Optional.
Also, in IPython and Jupyter Lab `?smth` displays help for symbol `smth`.
Yeah, and probably more Python users regularly use IPython than, say, BASIC, so maybe a bit more potential for confusion. Plus, it allows `smth?` too, which would actually be ambiguous if `int?` meant `Optional[int]`. But then, it would rarely be _useful_ to type `int?` on a line by itself just to see `Optional[int]`, so as long as there were an option to disable it, I don’t think anyone would complain if it still means help(int) by default. (iPython already has lots of features like that, which usually are convenient but very rarely are a problem, so you can disable them but they’re on by default.) I’m pretty sure the same thing came up during the discussion about adding null coalescing operators, and that was the consensus then, but don’t quote me on that.