Playing around...
This commit is contained in:
parent
2b7e3b3cc1
commit
56dedfa6ed
@ -343,7 +343,7 @@ class AST27Converter(object):
|
|||||||
|
|
||||||
def render_bool(self, node):
|
def render_bool(self, node):
|
||||||
""" Render a boolean to AST """
|
""" Render a boolean to AST """
|
||||||
thing = "True" if node else "False"
|
thing = "True" if node._val else "False"
|
||||||
return ast.Name(id=thing, ctx=ast.Load())
|
return ast.Name(id=thing, ctx=ast.Load())
|
||||||
|
|
||||||
def render_symbol(self, node):
|
def render_symbol(self, node):
|
||||||
|
@ -9,8 +9,9 @@ else:
|
|||||||
|
|
||||||
|
|
||||||
class HYString(HYObject, _str_type):
|
class HYString(HYObject, _str_type):
|
||||||
def __init__(self, string):
|
def __new__(cls, value):
|
||||||
self += string
|
obj = _str_type.__new__(cls, value)
|
||||||
|
return obj
|
||||||
|
|
||||||
def eval(self, ln, *args, **kwargs):
|
def eval(self, ln, *args, **kwargs):
|
||||||
return str(self)
|
return str(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user