What special method(s?) should I redefine in my class so that it handled AttributeError
s exceptions and returned a special value in those cases?
For example,
>>> class MySpecialObject(AttributeErrorHandlingClass):
a = 5
b = 9
pass
>>>
>>> obj = MySpecialObject()
>>>
>>> obj.nonexistent
'special value'
>>> obj.a
5
>>> obj.b
9
I googled for the answer but couldn't find it.