Y
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
folkrav
1526 days ago
Isn't `Optional[T]` just sugar for `Union[T, None]`?
link
whimsicalism
1526 days ago
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.
link