summaryrefslogtreecommitdiff
path: root/modules/language/python
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2017-09-17 00:13:25 +0200
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2017-09-17 00:13:25 +0200
commit884e534162ea190b72b53dbe0973980f6caf55c5 (patch)
tree7ccf5f83e647538bc3e5f894493008bfc9d2e454 /modules/language/python
parent5dd3ccc81ba364569c072facacf0a6363de4b63f (diff)
tuples
Diffstat (limited to 'modules/language/python')
-rw-r--r--modules/language/python/compile.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm
index 734fe60..3b5bd8f 100644
--- a/modules/language/python/compile.scm
+++ b/modules/language/python/compile.scm
@@ -698,10 +698,25 @@
(() ''())
(((#:starexpr #:power #f (#:list . l) . _) . _)
(lp l))
+ (((#:starexpr #:power #f (#:tuple . l) . _) . _)
+ (lp l))
(((#:starexpr . l) . _)
`(,(L 'to-list) ,(exp vs l)))
((x . l)
`(cons ,(exp vs x) ,(lp l))))))))
+ (#:tuple
+ ((_ . l)
+ (let lp ((l l))
+ (match l
+ (() ''())
+ (((#:starexpr #:power #f (#:list . l) . _) . _)
+ (lp l))
+ (((#:starexpr #:power #f (#:tuple . l) . _) . _)
+ (lp l))
+ (((#:starexpr . l) . _)
+ `(,(L 'to-list) ,(exp vs l)))
+ ((x . l)
+ `(cons ,(exp vs x) ,(lp l)))))))
(#:lambdef
((_ v e)