Name : python-bunch
| |
Version : 1.0.1
| Vendor : Fedora Project
|
Release : 11.fc27
| Date : 2017-07-28 18:09:25
|
Group : Development/Languages
| Source RPM : python-bunch-1.0.1-11.fc27.src.rpm
|
Size : 0.03 MB
| |
Packager : Fedora Project
| |
Summary : Python dictionary with attribute-style access
|
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\')])
|
RPM found in directory: /packages/linux-pbone/archive.fedoraproject.org/fedora-secondary/releases/27/Everything/aarch64/os/Packages/p |