Removing this from the draft was done purely because one type checker had an issue with it
You’re ignoring an important part of that statement. The authors admitted that they didn’t have a specific use case in mind. Adding functionality to the type system when there is no known use case is not a good idea, and I applaud the PEP authors for recognizing this.
This was not a case that involved consistency. In fact, the functionality that they removed from the spec was inconsistent with existing uses of Union
and ran counter to the efforts to deprecate Union
in favor of |
. By removing this functionality, they made the spec more consistent with the existing type system.
Also, implementation complexity is a consideration that should be taken into account by PEP authors. From the time that the first draft PEP 646 was presented for general review, it took almost three years for mypy to add support for it. Pyre still hasn’t added full support, and pytype hasn’t even started to add support for it. New type system features that are too complex to implement in type checkers do not help the community. If you are involved in drafting a typing PEP, please take that into consideration.