Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 4d1fd26

Browse files
authored
Merge pull request #89 from Varun-22/dev
converted
2 parents 283a89a + d7bf55f commit 4d1fd26

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class obj(object):
2+
def __init__(self, d):
3+
for x, y in d.items():
4+
setattr(self, x, obj(y) if isinstance(y, dict) else y)
5+
data = {'a':5,'b':7,'c':{'d':8}}
6+
ob = obj(data)

0 commit comments

Comments
 (0)