On Sep 17, 2019, at 08:03, Ivan Levkivskyi <levkivs...@gmail.com> wrote:
> 
> Note that there is a related PEP 585, and the outcome for this one may depend 
> on that PEP. 

It seems like Phillipe could write two versions.

If PEP 585 is accepted, then type.__or__ should not exist, and int|str should 
only work in annotations, taking advantage of annotations no longer being 
completely evaluated at runtime, just like list[int]. And that means no using 
it with isinstance, no builtin, etc., of course. Which makes for a very 
different proposal.

If PEP 585 is rejected, then this proposal as-is becomes more compelling, and 
might even point toward further static/runtime integrations that could be done 
without major costs.

In fact, having the two versions both ready could help clarify the discussion 
about PEP 585, and more generally about the advantages and disadvantages of 
going more toward a “two-kinded” type system vs. leaning more into “everything 
is first-class”.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/HBO4VHL6C2362UI3XLDLHHLMDHSZ5J6Z/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to