def as_list ( self ) : return [ self . name , self . value , [ x . as_list for x in self . children ] ]
object as a list python
Return all child objects in nested lists of strings .
def as_list(self):
        """Return all child objects in nested lists of strings."""
        return [self.name, self.value, [x.as_list for x in self.children]]