diff options
Diffstat (limited to 'astroid/interpreter/objects.py')
-rw-r--r-- | astroid/interpreter/objects.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/astroid/interpreter/objects.py b/astroid/interpreter/objects.py index 3c61aef4..237caad6 100644 --- a/astroid/interpreter/objects.py +++ b/astroid/interpreter/objects.py @@ -277,6 +277,18 @@ class Instance(BaseInstance): node=self, index=index, context=context)) +@util.register_implementation(runtimeabc.ExceptionInstance) +class ExceptionInstance(Instance): + """Class for instances of exceptions + + It has special treatment for some of the exceptions's attributes, + which are transformed at runtime into certain concrete objects, such as + the case of .args. + """ + + special_attributes = util.lazy_descriptor(lambda: objectmodel.ExceptionInstanceModel()) + + class Method(Proxy): def __repr__(self): |