- Name: python-bunch
- Version: 1.0.1
- Release: 5.mga5
- Epoch:
- Group: Development/Python
- License: MIT
- Url: http://github.com/dsc/bunch
- Summary: Python dictionary with attribute-style access
- Architecture: noarch
- Size: 35857
- Distribution: Mageia
- Vendor: Mageia.Org
- Packager: umeabot <umeabot>
Description:
python-bunch provides a python class which can perform as a dict whose keys are
also accessible as attributes, similar to JavaScript objects. For instance::
>>> import bunch
>>> people = bunch.Bunch({'alice': 'here', 'bob': 'there'})
>>> print people['alice'], people.alice
here here
The piece of python-bunch that sets it apart from similar modules found inside
other projects is the bunchify() function which recursively converts from
a dict to a Bunch::
>>> multi_level = {'array': ['scalar', {'mapping': 'to show recursion'} ]}
>>> bunch.bunchify(multi_level)
Bunch(array=['scalar', Bunch(mapping='to show recursion')])
- OptFlags: -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables
- Cookie: valstar.mageia.org 1413644220
- Buildhost: valstar.mageia.org
Sources packages:
Other version of this rpm: