You will need to rewrite most of things in C.

--
Ivan


On Tue 8 Oct 2019, 08:53 Philippe Prados, <philippe.pra...@gmail.com> wrote:

> 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 <random...@fastmail.com> 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 -- 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/GD7WXPD26VUPMZT6WAATCJJBB42DDYYQ/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
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/5UT7NKKB3KM6K67YL2ERMLX6YKLMAPAB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to