On Wed, 14 Apr 2021 10:12:19 +1000
Hugh Fisher <hugo.fis...@gmail.com> wrote:
> 
> For example, type equivalence by name only is used in Ada (or was,
> it's been many years) and probably other languages. In equivalence
> by name, the following code would not pass the type checker.
>     x : list[int]
>     y : list[int]
>     x = y # Type error
> 
> But I'm not aware of anyone implementing type by name equivalence
> for Python, and the original PEP 483 seems to explicitly close off that
> possibility. Instead the assumption seems to be Java/C++ structural
> equivalence for types.

Can you explain why you think C++ typing is based on structural
equivalence?

Regards

Antoine.


_______________________________________________
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/T7CDYAOV5RHMJI2N6ND6QXQWKWSPFQCV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to