Branches¶
Parent branches¶
Parent branches are accessed as: Note.branches.parents
.
Modeled as a set
as parent branches are not inherently ordered, but serialized by id()
when iterated.
When a Note
is added to the set, a parent Branch
is automatically created.
Child branches¶
Child branches are accessed as: Note.branches.children
.
Modeled as a list
of branches ordered by Branch.position
. Position is maintained automatically; you can simply reorder the list itself as desired.
When a Note
is added to the list, a child Branch
is automatically created.
Combined parent and child branches¶
Combined parent and child branches are accessed as: Note.branches
.
When iterated, yields from parent branches followed by child branches.
Parent notes¶
Parent notes are accessed directly as: Note.parents
.
Child notes¶
Child notes are accessed directly as: Note.children
.