From c60d4104260719841664ab770d0497e0aca17524 Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Sat, 22 Dec 2012 16:39:03 -0500 Subject: [PATCH] a bit more consise --- hy/compiler/ast27.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hy/compiler/ast27.py b/hy/compiler/ast27.py index 8df895f..21d2130 100644 --- a/hy/compiler/ast27.py +++ b/hy/compiler/ast27.py @@ -136,10 +136,8 @@ class AST27Converter(object): def render_bool(self, node): """ Render a boolean to AST """ - if node: - return ast.Name(id='True', ctx=ast.Load()) - else: - return ast.Name(id='False', ctx=ast.Load()) + thing = "True" if node else "False" + return ast.Name(id=thing, ctx=ast.Load()) def render_symbol(self, node): """ Render a symbol to AST """