You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
searching the repo for def parent does not yield any results
There are a number of red herrings in the search to understand what self.parent does and where it is documented because of toy examples in the issues and the docs where we have class Child and Class Parent where the Child class has a slot accessed via self.parent ... this is not the self.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:
From my understanding, parent is not necessarily the root application instance. Tartlets allows configurables to be arbitrarily nested. Consider the following
From Traitlets' internal perspective, the purpose is to allow thecfg to be passed down from the outer-most configurable to any inner configurables so they can be properly initialized. From the perspective of users, this does given you the ability to traverse these parent references to find that outer-most configurable.
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: