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
join is not associative in the presence of unions #3339
Maybe worth clarifying (in the original post) what's the desired outcome? I assume builtins.list[Union[builtins.str, builtins.int, builtins.None]] but wanted to make sure.
Activity
JukkaL commentedon May 8, 2017
It looks like joins should only produce unions if one of the operands is a union with more than one non-
Noneitem. Examples:join(Union[int, None], str)would beUnion[object, None]which would get simplified intoobject.join(Union[int, bytes, None], str)would beUnion[int, bytes, str, None].hauntsaninja commentedon May 21, 2023
Another example (which doesn't use None)
[-]join is not associative in strict optional mode[/-][+]join is not associative in the presence of unions[/+]ikonst commentedon May 22, 2023
Maybe worth clarifying (in the original post) what's the desired outcome? I assume
builtins.list[Union[builtins.str, builtins.int, builtins.None]]but wanted to make sure.