summaryrefslogtreecommitdiff
path: root/nodes.py
diff options
context:
space:
mode:
authorSylvain Thénault <sylvain.thenault@logilab.fr>2007-02-16 17:28:44 +0100
committerSylvain Thénault <sylvain.thenault@logilab.fr>2007-02-16 17:28:44 +0100
commit5cac2cdb427eed2bb3790154ede1da5577d87660 (patch)
tree123c9a68074c98e750eed9a1cd92a80502d5b0b1 /nodes.py
parent3baaccc59c36c20bd68e75cccc62a9afa600b26f (diff)
downloadastroid-git-5cac2cdb427eed2bb3790154ede1da5577d87660.tar.gz
* api change to be able to infer using a context (used to infer function call
result only for now)
Diffstat (limited to 'nodes.py')
-rw-r--r--nodes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nodes.py b/nodes.py
index 46d4cd04..782df543 100644
--- a/nodes.py
+++ b/nodes.py
@@ -236,9 +236,14 @@ class NodeNG:
isinstance(self, (Function, Lambda)) and self is frame):
return name
return None
+
+ def eq(self, value):
+ return False
extend_class(Node, NodeNG)
+Const.eq = lambda self, value: self.value == value
+
# block range overrides #######################################################
def object_block_range(node, lineno):