You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Conditional expression with branches of type None and T should be Optional[T], not object #1820
As discussed under #1863, we should go ahead and become willing to make Union types when one of the types to be combined is None. We might go back later and become less reluctant to make Union types more broadly, but there's more detailed discussion to be had there (see #1863.)
Activity
ddfisher commentedon Jul 21, 2016
Related to #1863. This is due to mypy's reluctance to make Union types.
gnprice commentedon Aug 1, 2016
As discussed under #1863, we should go ahead and become willing to make Union types when one of the types to be combined is None. We might go back later and become less reluctant to make Union types more broadly, but there's more detailed discussion to be had there (see #1863.)
Make join(None, T) produce Optional[T] in strict-optional (#1999)