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 -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/QEL35QYFF5KXSOE27C46NFHM5KDH3VMB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to