We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It is not always ideal to hardcode every BaseObj argument via self.need() or self.optional().
self.need()
self.optional()
Passing a dictionary to define these can be useful:
class Mountain(BaseObj): def new(self): self.args( { "need": {"height": {"type": int, "msg": "height is an int"}}, "optional": { "has_snow": { "type": Boolean, "default": False, "msg": "has_now is a Boolean", } }, } )
Alternatively, self.args can also be a BaseObj
self.args
The text was updated successfully, but these errors were encountered:
ramaro
No branches or pull requests
It is not always ideal to hardcode every BaseObj argument via
self.need()
orself.optional()
.Passing a dictionary to define these can be useful:
Alternatively,
self.args
can also be a BaseObjThe text was updated successfully, but these errors were encountered: