Actions
Feature #22126
closedPySDK method reference includes defaults
Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Story points:
-
Description
In arvados.api_resources
none of the methods specify default arguments. This comment explains the rationale:
# In normal Python the presence of a default tells you whether or # not an argument is required. In the API the `required` flag tells # us that, and defaults are specified inconsistently. Don't show # defaults in the signature: it adds noise and makes things more # confusing for the reader about what's required and what's # optional. The docstring can explain in better detail, including # the default value.
Improve this:
- If there is a useful default, specify that in the parameter.
- If there isn't, make the parameter
Optional[T]=None
.
Actions