Ok, But _GenericAlias and dependencies are written with Python (Lib/typing.py), not with C. So, I must rewrite the _GenericAlias in C or it's possible to merge the C and Python in builtin and add a direct reference to _GenericAlias with C, and add the reference in builtin module ?
Philippe Le lun. 7 oct. 2019 à 22:58, Random832 <[email protected]> a écrit : > 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 -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/GD7WXPD26VUPMZT6WAATCJJBB42DDYYQ/ Code of Conduct: http://python.org/psf/codeofconduct/
