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

Automatically list all members of accessor? #131

Open
gauteh opened this issue Oct 4, 2024 · 1 comment
Open

Automatically list all members of accessor? #131

gauteh opened this issue Oct 4, 2024 · 1 comment

Comments

@gauteh
Copy link

gauteh commented Oct 4, 2024

Is there a way to avoid having to list all the members of the accessor? Possibly specifying a class which is returned by the accessor?

(e.g.: https://opendrift.github.io/trajan/api.html#methods)

@keewis
Copy link
Collaborator

keewis commented Oct 6, 2024

not that I know of, and this would be tricky to support either way: I don't know of a reliable way to classify the different items as methods and attributes (__call__ / __getitem__ will always require special attention), and even more so if you have nested accessors, with the second one being callable (ds.accessor1.accessor2()).

I'm happy to be proven wrong, but for now I believe the explicit choice of the documentation method is a good thing.

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

No branches or pull requests

2 participants