Hacker News new | ask | show | jobs
by whimsicalism 1526 days ago
I disagree with your last line, especially for Optional (Union in python is basically useless IMO).
1 comments

Isn't `Optional[T]` just sugar for `Union[T, None]`?
Touché. I guess a common pattern I find myself doing for Union types is having if statements checking if something is of a type using reflection. When checking if it is none, it is more elegant.