make xi compatible with Python2

This commit is contained in:
gilch 2015-08-11 19:35:22 -06:00
parent 0bf1084d8c
commit 20d6349679

View File

@ -133,12 +133,12 @@
(str i)))
[i (range 1
;; find the maximum xi
(inc (max (genexpr (int (cdr a))
(inc (max (+ (list-comp (int (cdr a))
[a flatbody]
(and (symbol? a)
(.startswith a 'x)
(.isdigit (cdr a))))
:default 0)))])
[0]))))])
;; generate the &rest paremeter only if 'xi is present in body
~@(if (in 'xi flatbody)
'(&rest xi)