Re:Why type hinting sucks (/r/Python)
by ZiiS on Saturday February 11, 2023 @09:07AM
(#34752383)
`int | None` is often prefered in the newest versions.
[ Parent
| on HN ]
Re:Why type hinting sucks (/r/Python)
by codethief on Saturday February 11, 2023 @09:36AM
(#34752630)
I must have missed this. Union types using | are possible now?
Yes, saves the import and looks cleaner IMHO https://www.blog.pythonlibrary.org/2021/09/11/python-3-10-si...