a bit more consise
This commit is contained in:
parent
004eb9a977
commit
c60d410426
@ -136,10 +136,8 @@ class AST27Converter(object):
|
|||||||
|
|
||||||
def render_bool(self, node):
|
def render_bool(self, node):
|
||||||
""" Render a boolean to AST """
|
""" Render a boolean to AST """
|
||||||
if node:
|
thing = "True" if node else "False"
|
||||||
return ast.Name(id='True', ctx=ast.Load())
|
return ast.Name(id=thing, ctx=ast.Load())
|
||||||
else:
|
|
||||||
return ast.Name(id='False', ctx=ast.Load())
|
|
||||||
|
|
||||||
def render_symbol(self, node):
|
def render_symbol(self, node):
|
||||||
""" Render a symbol to AST """
|
""" Render a symbol to AST """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user