From 0b7191397e7893011fda16402e1fbd56afb911d3 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Sun, 8 Sep 2013 16:29:30 -0700 Subject: ENH: add support for Python 3.4 ast.NameConstant --- numpy/lib/utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'numpy/lib/utils.py') diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 1b968f1fc..bd5d04430 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -1062,6 +1062,9 @@ class SafeEval(object): else: raise SyntaxError("Unknown name: %s" % node.id) + def visitNameConstant(self, node): + return node.value + def safe_eval(source): """ Protected string evaluation. -- cgit v1.2.1