typing
typing copied to clipboard
Incorporate PEP 483 into the spec
I don't know if this was already considered and rejected (I didn't find an existing issue about it), but I noticed today that some key concepts and terms used in the typing spec (e.g. the consistent-with relation) don't seem to be clearly defined anywhere in the spec.
I think the way to address this that would be most in the spirit of the current spec would be to incorporate PEP 483 (possibly with some edits) into the spec. As far as I can see, it wasn't included in the original PEP-concatenation that formed the initial spec; was that intentional?
I think I didn't include it because PEP 483 is marked Informational, so it shouldn't be normative. I agree that it would be good to include concepts like "consistent-with" in the spec, but I don't know if PEP 483 is the right formalization to use at this point.
PEP-484 omits quite a few details. For example, it only partially defines is-consistent-with. I would recommend adopting (or starting with) the definitions in http://bit.ly/python-subtyping by @kmillikin instead.
PEP-484 omits quite a few details
I assume you mean 483 here?
I initially suggested 483 because I thought it might be less controversial, given it is already an accepted PEP. But personally, I like the clarity of the kmillikin spec quite a lot and would be happy to use it as a starting point.
Yes, I did mean PEP-483, although the above is true for PEP-484 as well :)
I think this can be considered a duplicate of #1534