On Mon, Oct 7, 2019, at 12:02, Philippe Prados wrote: > Because this PEP propose to accept, for all classes > assert isinstance("", int | str) > assert issubclass(int, int | str) > and add an operator __or__() for type type. > def f(list: List[int | str], param: int | None) -> float | str: > pass
Oh, sorry, I didn't realize that this also included the | operator, I thought this was just for isinstance("", Union[int, str]). _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/52EL5VM6P3CZ7TMN7HOKUS7BCUE6HMFB/ Code of Conduct: http://python.org/psf/codeofconduct/