-
Notifications
You must be signed in to change notification settings - Fork 32
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
Can we have hasdefault
or alldefaults
methods?
#113
Comments
In principle this is covered by the auto-generated doc-strings. Although they don't work too well:
So, this should be fixed . But I'm against adding those query methods. |
This is not for documenting issues. It is for programming issues. I want to filter all the fields that have default values and do things to them. It is not possible and ugly to list them one by one for a type with many (>20) fields. |
I see. This seems pretty niche and is not something I ever see myself using, so I'm not interested in having to support this. However, I think this could be implemented with a post-processing function, for which support is envisaged, at some point. Something along what's mentioned in #52. |
In addition to this issue topic, it is sometimes useful to have access to the default values for some fields. This capability can allow for more rich integration when automatically populating structures (e.g. custom ArgParse.jl integrations). |
If we have a type that is not entirely fed with default values, is there a method that can tell users which fields have default values and which fields do not? For example,
The text was updated successfully, but these errors were encountered: