bunch
bunch copied to clipboard
A Bunch is a Python dictionary that provides attribute-style access (a la JavaScript objects).
All tests pass on python 2.7 and 3.4.
Using sys.version_info() to determine python 2 or 3
Sometimes is useful to keep parsing a large json object even when some properties are not present right now any key that's not found rises an error. My suggestion is...
I want to use [Sourcegraph code search and code review](https://sourcegraph.com) with bunch. A project maintainer needs to enable it to set up a webhook so the code is up-to-date there....
Hello, With Python 2.7: ``` from bunch import Bunch b=Bunch(foo=Bunch(lol=True), hello=42, ponies='are pretty!') [ (k,b[k]) for k in b ] ``` returns ``` [('ponies', 'are pretty!'), ('foo', Bunch(lol=True)), ('hello', 42)]...
Hello, I think it will be nice to add some tests (not with `unittest` package but using either `nosetests`or `py.test` Moreover continuous integration with Travis-CI will be a good idea...
I took most recent fork https://github.com/redodo/lunch/ and fork it https://github.com/femtotrader/lunch/ to add CI https://travis-ci.org/femtotrader/lunch I saw this with Python 3.3: AttributeError: 'Bunch' object attribute 'values' is read-only Any idea ?...
Hello, I see 2 README files so the question is Markdown or reStructuredText ? If you prefere Markdown you might be interested by https://pypi.python.org/pypi/setuptools-markdown Kind regards
Hello, I wonder how to pretty print Bunch objects: ``` import pprint pp = pprint.PrettyPrinter(indent=4) pp.pprint(b) ``` Any idea ?
It is not documented what happens if Bunch() is expanded using dictionary notation with an element, which key is invalid for property access?