Can i add a node in the nodelist returned from get_node_list() ?

i am trying to create a python application going through all our devices that are expected to be in the network, trying to see if they are reachable and if so read some further information from them.

So i start with the get_node_list returning a list of class node:
node_list = zigbee.get_node_list(refresh=False, discover_digi=False, discover_zigbee=False)

After that i read a list of extended addresses from a file containing the extended addresses which are supposed to be reachable.
I walk though this list and check if the address is already in my node_list, that is no problem.
But for any address NOT (yet) in my node_list i want to add it so i can later iterate over the complete list (and use extended discovery methods to see if i can find it).
Where i am stuck is when i try to add a new member (tuple of class node) to node_list.
Is there a way to do this?

I tried: new_node = zigbee.node() but this node does not exist
I also tried node_list.append(), but it gives an error that the tuple has no append method defined.

thanks for any help

The zigbee.get_node_list() function isn’t Python, so you can’t extend it. The node_list is probably a tuple (since it’s created in C++), so it cannot be extended or appended to.

You can do:
node_list = list(zigbee.get_node_list(refresh=False, discover_digi=False, discover_zigbee=False))

This should convert the tuple to a list, which can be appended. However, you additions will NOT be saved and the next time you call get_node_list() it won’t be there.

You could create you own node_list object, which handle both the results from zigbee.get_node_list, and what you add manually.