3 ms·
In my experience, it was quite jarring to see a python function with a bunch of : -> Union[int,str], Optional, Any, etc. Change is always hard.
by yuy910616 5y ago
In my experience, it was quite jarring to see a python function with a bunch of : -> Union[int,str], Optional, Any, etc.
Change is always hard.
- takeda 5y agoI actually don't understand Optional in that mix. "Optional" basically means the value can be "None". You typically use it like this "Optional[str]" which means the value is a string or "None".