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
Confused about self.parent #840
Comments
From my understanding, cfg = Config(...)
c1 = Class1(config=cfg)
c2 = Class2(parent=c1)
c3 = Class3(parent=c1)
assert c3.parent.parent == c1 From Traitlets' internal perspective, the purpose is to allow the |
Hello, I am making heavy use of
self.parent
in some code I wrote, but:parent
def parent
does not yield any resultsself.parent
does and where it is documented because of toy examples in the issues and the docs where we haveclass Child
andClass Parent
where theChild
class has a slot accessed viaself.parent
... this is not theself.parent
that is being heavily used in my Traitlets-based applications... but for the life of me, I cannot remember why I started using it and what the semantics are.Actually I think I found it : it's defined as "The parent Configurable instance of this object." ... ah I think I know the purpose of this... it's to get at the Application class that is the parent of the Configurable class so that you can access slots within the Application... is that correct?
The text was updated successfully, but these errors were encountered: