summaryrefslogtreecommitdiff
path: root/astroid/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/objects.py')
-rw-r--r--astroid/objects.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/astroid/objects.py b/astroid/objects.py
index 6597f3e8..83074664 100644
--- a/astroid/objects.py
+++ b/astroid/objects.py
@@ -169,3 +169,14 @@ class Super(node_classes.NodeNG):
def getattr(self, name, context=None):
return list(self.igetattr(name, context=context))
+
+
+class ExceptionInstance(bases.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())