Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def to_dict(self):
- return dict({'identification': self.identifier,
- 'information': self.information,
- 'nodes': {e.position: e.to_dict for e in self.children}
- })
- def to_dict(self):
- return dict({'identification': self.identifier,
- 'information': self.information,
- 'nodes': {e.position: e.to_dict for e in self.children} if self.children
- })
- def to_dict(self):
- retval = {'identification': self.identifier,
- 'information': self.information,
- }
- if self.children:
- retval['nodes'] = {e.position: e.to_dict for e in self.children}
- return retval
- def to_dict(self):
- retval = dict(identification=self.identifier,
- information=self.information)
- if self.children:
- retval['nodes'] = {e.position: e.to_dict for e in self.children}
- return retval
Add Comment
Please, Sign In to add comment