Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> for some reason Optional[T] became deprecated, just as the ecosystem finally embraced types

Deprecated in favour of `T | None` exactly because of that embrace. It's cleaner, more consistent (you can `T | U` arbitrarily), and helps slim down the `from typing` imports.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: