Skip to content

Instantly share code, notes, and snippets.

@carloscabanero
carloscabanero / .gitignore
Created June 14, 2016 14:45 — forked from BennettSmith/.gitignore
Google Protobuf v2.6.0 Build Script for iOS
protobuf
protobuf-2.6.0
protobuf-2.6.1
protobuf-master
@carloscabanero
carloscabanero / The attributed dictionary
Created October 25, 2012 10:25 — forked from lgr/attributed_dict.py
A dictionary which keys can be accessed and added as object attributes.
class AttributedDict(dict):
"""
A class extending the standard dict so that its keys can be accessed
as an object attributes (as long as the are strings).
Notice: this class is not pickable, so for example an attempt to save
its instance in Django session causes an error.
"""
__getattr__ = dict.__getitem__