make xi compatible with Python2
This commit is contained in:
parent
0bf1084d8c
commit
20d6349679
@ -133,12 +133,12 @@
|
|||||||
(str i)))
|
(str i)))
|
||||||
[i (range 1
|
[i (range 1
|
||||||
;; find the maximum xi
|
;; find the maximum xi
|
||||||
(inc (max (genexpr (int (cdr a))
|
(inc (max (+ (list-comp (int (cdr a))
|
||||||
[a flatbody]
|
[a flatbody]
|
||||||
(and (symbol? a)
|
(and (symbol? a)
|
||||||
(.startswith a 'x)
|
(.startswith a 'x)
|
||||||
(.isdigit (cdr a))))
|
(.isdigit (cdr a))))
|
||||||
:default 0)))])
|
[0]))))])
|
||||||
;; generate the &rest paremeter only if 'xi is present in body
|
;; generate the &rest paremeter only if 'xi is present in body
|
||||||
~@(if (in 'xi flatbody)
|
~@(if (in 'xi flatbody)
|
||||||
'(&rest xi)
|
'(&rest xi)
|
||||||
|
Loading…
Reference in New Issue
Block a user