Report abuse
1
2
3
4
5
6
7
8
9
10
11
12
|
>>> from collective.solr.parser import AttrDict
>>> a = AttrDict()
>>> a.update(foo=23, bar=42)
>>> a
{'foo': 23, 'bar': 42}
>>> a['another'] = AttrDict(foo=13)
>>> a
{'foo': 23, 'bar': 42, 'another': {'foo': 13}}
>>> a.foo
23
>>> a.another.foo
13
|