changed try to testing for an empty list for legibility (as suggested by paultag), also added to authors

This commit is contained in:
Guillermo Vaya 2013-06-26 01:58:28 +02:00 committed by Nicolas Dandrimont
parent 7b7b953410
commit 4c7b4f70e3
2 changed files with 5 additions and 3 deletions

View File

@ -13,3 +13,4 @@
* rogererens <roger.erens@e-s-c.biz>
* Thomas Ballinger <thomasballinger@gmail.com>
* Morten Linderud <mcfoxax@gmail.com>
* Guillermo Vayá <guivaya@gmail.com>

View File

@ -70,12 +70,13 @@ _wrappers = {
def process(tree, module_name):
if isinstance(tree, HyExpression):
try:
fn = tree[0]
except IndexError:
if tree == []:
# set value to []
ntree = HyList()
ntree.replace(tree)
return ntree
fn = tree[0]
if fn in ("quote", "quasiquote"):
return tree
ntree = HyExpression(