summaryrefslogtreecommitdiff
path: root/node_classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'node_classes.py')
-rw-r--r--node_classes.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/node_classes.py b/node_classes.py
index d7deb76b..f61a6ad3 100644
--- a/node_classes.py
+++ b/node_classes.py
@@ -1,7 +1,7 @@
#
from logilab.astng import (ASTNGBuildingException, InferenceError,
NotFoundError, NoDefault)
-from logilab.astng._nodes import NodeNG, StmtMixIn, BlockRangeMixIn, BaseClass, _const_factory
+from logilab.astng._nodes import NodeNG, StmtMixIn, BlockRangeMixIn, BaseClass
from logilab.astng.infutils import Instance
"""
@@ -528,10 +528,9 @@ def const_factory(value):
else:
node.elts = ()
except KeyError:
- try:
- node = Const(value)
- except KeyError:
- node = _const_factory(value)
+ assert isinstance(value, (int, long, complex, float, basestring))
+ node = Const()
+ node.value = value
return node