Hi Philippe,

Maybe the implementation of `_GenericAlias` should live in
Objects/typobject.c, and be a part of the public API. Then the "|" overload
on PyType_Type (also there) can reference it directly, it can be exported
from Python/bltinsmodule.c, and typing can reference it as a builtin.

--Guido

On Mon, Oct 7, 2019 at 8:14 AM Philippe Prados <[email protected]>
wrote:

> Hello,
>
> I try to implement a *proof of concept* of Pep-0604
> <https://www.python.org/dev/peps/pep-0604/>.
>
> To do this, the _GenericAlias must be in builtin, because I would like to
> update issubclass() and isinstance() to accept Union.
> These methods are in builtin, and must be run without others modules.
>
> But, the class _GenericAlias is in typing module, with the Python
> implementation in Lib/typing.py, and the C implementation is in
> Modules/_ctypes.
>
> For you, what is the best approach to move the _GenericAlias and all
> dependencies in the builtin "module" ?
>
> Philippe
> _______________________________________________
> 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/FVDIL2DG3EP7CO452MUZYPATN4R2CEHN/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
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/UPLGMF26ITYIVH4DMQ7YOC5Y7TJGQSXU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to