Skip to content

Commit

Permalink
Leave some extra comment on slot usage, refs #28.-
Browse files Browse the repository at this point in the history
  • Loading branch information
c0fec0de committed Nov 6, 2017
1 parent 40be98f commit 79044d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ A node class implementation might implement the notification slots
:any:`_pre_detach(parent)`, :any:`_post_detach(parent)`,
:any:`_pre_attach(parent)`, :any:`_post_attach(parent)`.

These methods are *protected* functions,
intended to be overwritten by child classes of :any:`NodeMixin`/:any:`Node`.
They are called on modifications of a nodes `parent` attribute.
Never call them directly from API.
This will corrupt the logic behind these methods.

>>> class NotifiedNode(Node):
... def _pre_detach(self, parent):
... print("_pre_detach", parent)
Expand Down

0 comments on commit 79044d6

Please sign in to comment.