diff --git a/jedi/api_classes.py b/jedi/api_classes.py index 57613444..7b528ba8 100644 --- a/jedi/api_classes.py +++ b/jedi/api_classes.py @@ -318,6 +318,7 @@ class Completion(BaseDefinition): provide additional information about a completion. """ def __init__(self, name, needs_dot, like_name_length, base): + print name super(Completion, self).__init__(name.parent, name.start_pos) self._name = name diff --git a/test/completion/basic.py b/test/completion/basic.py index cedfd9f5..04f5187b 100644 --- a/test/completion/basic.py +++ b/test/completion/basic.py @@ -235,7 +235,6 @@ A().hello # ----------------- # unicode # ----------------- - a = 'smörbröd' #? str() a @@ -243,3 +242,21 @@ xyz = 'smörbröd.py' if 1: #? str() xyz + +# ----------------- +# exceptions +# ----------------- +try: + import math +except ImportError as i_a: + #? ['i_a'] + i_a + #? ImportError() + i_a +try: + import math +except ImportError, i_b: + #? ['i_b'] + i_b + #? ImportError() + i_b