On Sep 17, 2019, at 08:03, Ivan Levkivskyi
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”.