Playing around...

This commit is contained in:
Paul Tagliamonte 2013-01-08 22:52:04 -05:00
parent 2b7e3b3cc1
commit 56dedfa6ed
2 changed files with 4 additions and 3 deletions

View File

@ -343,7 +343,7 @@ class AST27Converter(object):
def render_bool(self, node):
""" 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())
def render_symbol(self, node):

View File

@ -9,8 +9,9 @@ else:
class HYString(HYObject, _str_type):
def __init__(self, string):
self += string
def __new__(cls, value):
obj = _str_type.__new__(cls, value)
return obj
def eval(self, ln, *args, **kwargs):
return str(self)