hasattr() should not raise. A simple testcase: class NoAttribute(object): def __getattr__(self, name): raise AttributeError obj = NoAttribute() print hasattr(obj, 'attribute') Seo Sanghyeon