summaryrefslogtreecommitdiff
path: root/inference.py
diff options
context:
space:
mode:
Diffstat (limited to 'inference.py')
-rw-r--r--inference.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/inference.py b/inference.py
index 8522a30c..2e75d1f6 100644
--- a/inference.py
+++ b/inference.py
@@ -286,12 +286,14 @@ def infer_subscript(self, context=None):
else:
raise InferenceError()
nodes.Subscript.infer = path_wrapper(infer_subscript)
+nodes.Subscript.infer_lhs = raise_if_nothing_infered(infer_subscript)
-UNARY_OP_METHOD = {'+': '__pos__',
- '-': '__neg__',
- 'not': None, # XXX not '__nonzero__'
- }
+UNARY_OP_METHOD = {'+': '__pos__',
+ '-': '__neg__',
+ '~': '__invert__',
+ 'not': None, # XXX not '__nonzero__'
+ }
def infer_unaryop(self, context=None):
for operand in self.operand.infer(context):