[Python-ideas] Re: Confusing naming of Optional type should be changed

2022-06-30 Thread Stephen J. Turnbull
nveric...@gmail.com writes: > I accidentally created another thread in python-dev as I mentioned > above, but ideally Optional and Union should both be deprecated and > phased out for the new syntax. I think a formal deprecation is a bad idea. An annotation is an object, which has a type. Bo

[Python-ideas] Re: Typescript-Like Notational Shortcuts

2022-06-30 Thread Paul Bryan
On Tue, 2022-05-31 at 21:08 +, kevinlu1...@gmail.com wrote: > On the theme of the addition of pip operators to indicate union, I > was wondering what people think of using the following shortcuts for > type hints. > * type[] be a short-hand for List[type] I'm at -½ on this idea. Using list[ty

[Python-ideas] Re: Confusing naming of Optional type should be changed

2022-06-30 Thread nverich07
I accidentally created another thread in python-dev as I mentioned above, but ideally Optional and Union should both be deprecated and phased out for the new syntax. ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email t

[Python-ideas] Re: Confusing naming of Optional type should be changed

2022-06-30 Thread Jelle Zijlstra
El jue, 30 jun 2022 a las 10:46, escribió: > (I apologize in advance if I've posted anything incorrectly before, I > believe I might have sent this in python-dev instead but not sure as it's > not appearing in the posts for my account). > > I am aware this is clarified in the Python documentation

[Python-ideas] Confusing naming of Optional type should be changed

2022-06-30 Thread nverich07
(I apologize in advance if I've posted anything incorrectly before, I believe I might have sent this in python-dev instead but not sure as it's not appearing in the posts for my account). I am aware this is clarified in the Python documentation for the typing module but I and others have though