a bit more consise

This commit is contained in:
Paul Tagliamonte 2012-12-22 16:39:03 -05:00
parent 004eb9a977
commit c60d410426

View File

@ -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 """