-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Support structural subtyping with ExtensionArray #57634
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
Conversation
Can you expand on this? Early on when implementing EAs there was an idea that it could be implemented in terms of a small number of primitives (so the EA namespace could stay small) but that idea didn't pan out. |
Yea I am referring to anything that is a method on the ExtensionArray but that is not documented as part of the interface. |
So is the suggestion to move those things out of the EA namespace or just to document them as required? This Protocol approach seems to make it difficult to implement default-but-overridable implementations for things. |
Yea not sure yet how to best move things. Maybe that would require something like |
This seems like a lot of effort to reinvent the idea of a subclass. Is there any evidence that this is a pain point for 3rd parties? |
I am not aware of an existing library asking for this. It would be a new feature for a library that in the future may want to implement a class in an extension without having to interact heavily with the Python runtime |
Closing for now - may revisit later |
This is a very naive implementation. Ideally we would move a lot of the extraneous functions / attributes out of the core
ExtensionArray
class and into a better home