From 951c174da8f2bc22cb539c74fcb37bd850fd8640 Mon Sep 17 00:00:00 2001 From: Philipp Volugine Date: Tue, 10 Sep 2013 03:27:32 -0400 Subject: _ast_util.py added visit_NameConstant to SourceGen SourceGenerator didn't work with python3.4 alpha, `None` Is now a NameConstant rather than a Name in ast the new method deals with converting it to a string --- mako/_ast_util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mako/_ast_util.py b/mako/_ast_util.py index cec767c..5b1a8e4 100644 --- a/mako/_ast_util.py +++ b/mako/_ast_util.py @@ -659,6 +659,9 @@ class SourceGenerator(NodeVisitor): def visit_Name(self, node): self.write(node.id) + def visit_NameConstant(self, node): + self.write(str(node.value)) + def visit_arg(self, node): self.write(node.arg) -- cgit v1.2.3