What about using `(int, str)` for indicating a `Union`? This doesn't have
compatibility issues and it's similar to `isinstance(foo, (int, str))`, so it
should be fairly intuitive:
def bar(foo: (int, str) = 0):
...
Also it's similar to `get_args(Union[int, str])`.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/QEL35QYFF5KXSOE27C46NFHM5KDH3VMB/
Code of Conduct: http://python.org/psf/codeofconduct/