Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate PEP 483 into the spec #1666

Open
carljm opened this issue Mar 21, 2024 · 4 comments
Open

Incorporate PEP 483 into the spec #1666

carljm opened this issue Mar 21, 2024 · 4 comments
Labels
topic: documentation Documentation-related issues and PRs topic: typing spec For improving the typing spec

Comments

@carljm
Copy link
Member

carljm commented Mar 21, 2024

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?

@carljm carljm added the topic: documentation Documentation-related issues and PRs label Mar 21, 2024
@AlexWaygood AlexWaygood added the topic: typing spec For improving the typing spec label Mar 21, 2024
@JelleZijlstra
Copy link
Member

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.

@superbobry
Copy link

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.

@carljm
Copy link
Member Author

carljm commented Mar 22, 2024

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.

@superbobry
Copy link

Yes, I did mean PEP-483, although the above is true for PEP-484 as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Documentation-related issues and PRs topic: typing spec For improving the typing spec
Projects
None yet
Development

No branches or pull requests

4 participants