From cda5c6534b0bfd31a17bb87de062c42ead230099 Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Tue, 18 Dec 2012 21:11:38 -0500 Subject: [PATCH] making some language changes. --- hy/lang/list.py | 2 +- hy/lang/map.py | 2 +- hy/lang/string.py | 5 ++++- tox.ini | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hy/lang/list.py b/hy/lang/list.py index 264ab3f..3782ec2 100644 --- a/hy/lang/list.py +++ b/hy/lang/list.py @@ -3,7 +3,7 @@ from hy.lang.hyobj import HYObject class HYList(HYObject, list): def __init__(self, nodes): - self += nodes + [self.append(node) for node in nodes] def get_children(self): return self diff --git a/hy/lang/map.py b/hy/lang/map.py index dc98da5..c3032f7 100644 --- a/hy/lang/map.py +++ b/hy/lang/map.py @@ -1,7 +1,7 @@ from hy.lang.hyobj import HYObject -class HYMap(dict, HYObject): +class HYMap(HYObject, dict): def __init__(self, nodes): for node in nodes: self[node] = nodes[node] diff --git a/hy/lang/string.py b/hy/lang/string.py index 6648c52..13d2d29 100644 --- a/hy/lang/string.py +++ b/hy/lang/string.py @@ -8,6 +8,9 @@ else: _str_type = unicode -class HYString(_str_type, HYObject): +class HYString(HYObject, _str_type): def __init__(self, string): self += string + + def eval(self, ln, *args, **kwargs): + return str(self) diff --git a/tox.ini b/tox.ini index d1bed5b..ba3898e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ -# content of: tox.ini , put in same dir as setup.py [tox] -envlist = py27,pypy,py32,py33 -# jython -- jython fails? +envlist = py27,pypy,py32 [testenv] commands = nosetests -deps = nose +deps = + nose + setuptools