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> * rogererens <roger.erens@e-s-c.biz>
* Thomas Ballinger <thomasballinger@gmail.com> * Thomas Ballinger <thomasballinger@gmail.com>
* Morten Linderud <mcfoxax@gmail.com> * Morten Linderud <mcfoxax@gmail.com>
* Guillermo Vayá <guivaya@gmail.com>

View File

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