Browse Source

Merge branch 'master' into rfk/master

main
Lakshmi Vyasarajan 13 years ago
parent
commit
9e09ce5520
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      hyde/model.py

+ 4
- 0
hyde/model.py View File

@@ -67,6 +67,10 @@ class Expando(object):
for k, v in d.iteritems(): for k, v in d.iteritems():
if isinstance(v, Expando): if isinstance(v, Expando):
d[k] = v.to_dict() d[k] = v.to_dict()
elif isinstance(v, (tuple, list, set, frozenset)):
seq = type(v)
d[k] = seq(item.to_dict() if isinstance(item, Expando)
else item for item in v)
return d return d






Loading…
Cancel
Save