dsc / bunch

A Bunch is a Python dictionary that provides attribute-style access (a la JavaScript objects).
http://github.com/dsc/bunch
MIT License
483 stars 176 forks source link

Change raise AttributeError(k) to None #26

Open betolink opened 9 years ago

betolink commented 9 years ago

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 that we could have an optional init parameter to define if we want strict rules or just returning None in case the key is not present.