I have a key-word, e.g. friendly. It gives birth to a child-word, e.g. warm, while descending from a parent-word, e.g. friend.
from collections import namedtuple
keyword = 'friendly'
childword = 'warm'
parentword = 'friend'
connect=namedtuple(keyword,'children parents')
output = connect([childword],[parentword])
As a result, I can use output.children to see what are the children of my nodeword. However, what I really want to do is to type
friendly.children # instead of output.children
to see the children of the key-word friendly. How can I do this? I am completely new to Python; I am not even sure if this is doable.