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

Document structural subtypes hierarchy #869

Open
tristanlatr opened this issue Jan 23, 2025 · 0 comments
Open

Document structural subtypes hierarchy #869

tristanlatr opened this issue Jan 23, 2025 · 0 comments

Comments

@tristanlatr
Copy link
Contributor

typing.Protocol are the new way to declare interfaces. But it's much harder to process than zope interfaces because implementers do not require to explicitly declare implementing a specific protocol. So we'll have to do some matching.. The problem with this is the fact that we won't ever have a complete understanding of the type system, so we'll have to find middle ground somewhere.

@runtime_checkable decorator make things a little bit simpler since it skip the type checks to only matches the names of the members, so that's a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant