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
Is there a way with gin-config to reference an object's member variables e.g. self.my_member_var?
self.my_member_var
The text was updated successfully, but these errors were encountered:
I suppose if the Class has a property declaration for it I think it should work
Class
@gin.register Class MyClass: def __init__(value): self._my_member_var = value @gin.register @property def my_member_var(self): return self._my_member_var
Then try to use it in a gin file
# -*-Gin-*- MyObject/MyClass.value = 5 function.arg = @MyObject/MyClass.my_member_var
If with a @property doesn't work try just define a method
@property
@gin.register def my_member_var(self): return self._my_member_var # function.arg = @MyObject/MyClass.my_member_var()
Sorry, something went wrong.
No branches or pull requests
Is there a way with gin-config to reference an object's member variables e.g.
self.my_member_var
?The text was updated successfully, but these errors were encountered: