We would like to learn about your use case. For example, if this feature is needed to adopt Narwhals in an open source project, could you please enter the link to it below?
It would be nice if typing.runtime_checkable decorator could be added to NativeFrame.
Please describe the purpose of the new feature or describe the problem to solve.
This would allow me to avoid maintaining a copy of the Protocol in my own project for instances checking.
Also, I haven't looked at how NativeFrame is used in narwhals internals, but if there's any getattr access to check at runtime the Protocol compliance, this can be a nicer alternative.
My test suite show that it works :)
Suggest a solution if possible.
No response
If you have tried alternatives, please describe them below.
No response
Additional information that may help us understand your needs.
No response
We would like to learn about your use case. For example, if this feature is needed to adopt Narwhals in an open source project, could you please enter the link to it below?
It would be nice if
typing.runtime_checkabledecorator could be added toNativeFrame.Please describe the purpose of the new feature or describe the problem to solve.
This would allow me to avoid maintaining a copy of the Protocol in my own project for instances checking.
Also, I haven't looked at how
NativeFrameis used in narwhals internals, but if there's anygetattraccess to check at runtime the Protocol compliance, this can be a nicer alternative.My test suite show that it works :)
Suggest a solution if possible.
No response
If you have tried alternatives, please describe them below.
No response
Additional information that may help us understand your needs.
No response