paleolimbot commented on issue #38325: URL: https://github.com/apache/arrow/issues/38325#issuecomment-2037583994
That is a good question! I think Joris mentioned earlier that one approach would be to `try:` and do something else if there was an error passing the extra keywork argument. That seems like it would scale poorly and perhaps lead to confusing errors but there may be precedent/a better way to do this. It seems like `inspect.signature()` makes it possible to introspect argument names, if the evolution of this protocol can be fully captured by the existence of formal argument names. I checked and it seems to work for methods implemented in Cython (worth checking that this is also true for methods implemented in pybind11 or nanobind). One could also provide `__arrow_c_capabilities__` (or something) such that `hasattr(x, "__arrow_c_capabilities__") and "something" in x.__arrow_c_capabilities__` captures the ability to use one or more of the protocol methods in a particular way. Perhaps versioning the protocol and querying that would be more straightfoward. Or perhaps other ways? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
