SHARE
TWEET

Untitled

a guest Jun 16th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class foo:
  2.     def __init__(self,name):
  3.         self.name = name
  4.         #other attributes
  5.         self.children = [] #Child objects in self.children
  6.  
  7.     def convert(self):
  8.         return vars(self)
  9.      
  10. {'name': 'name', 'children': [object1,object2...]}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top