summaryrefslogtreecommitdiff
path: root/modules/language/python/compile.scm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/language/python/compile.scm')
-rw-r--r--modules/language/python/compile.scm28
1 files changed, 20 insertions, 8 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm
index 3d9fc95..b287e4b 100644
--- a/modules/language/python/compile.scm
+++ b/modules/language/python/compile.scm
@@ -822,6 +822,17 @@
((_ (#:from (() . nm) . #f))
`(use-modules (language python module ,@(map (lambda (nm) (exp vs nm))
nm))))
+ ((_ (#:from (() . nm) . l))
+ `(use-modules ((language python module ,@(map (lambda (nm) (exp vs nm))
+ nm))
+ #:select ,(map (lambda (x)
+ (match x
+ ((a . #f)
+ (exp vs a))
+ ((a . b)
+ (cons (exp vs a) (exp vs b)))))
+ l))))
+
((_ (#:name ((ids ...) . as)) ...)
(pk x)
@@ -836,20 +847,21 @@
((#:test (#:power #f ,as ())))
(#:assign
((#:verb
- ((@ (language python module) Module)
- ',(reverse (append '(language python module) path))
- ',(reverse path)))))))
-
+ ((@ (language python module) import)
+ ((@ (language python module) Module)
+ ',(reverse (append '(language python module) path))
+ ',(reverse path))
+ ,(exp vs as)))))))
(exp
vs
`(#:expr-stmt
((#:test (#:power #f ,(car ids) ())))
(#:assign
((#:verb
- (((@ (language python module) import)
- ((@ (language python module) Module)
- ',(append '(language python module) path))
- ,(exp vs (car ids))))))))))))
+ ((@ (language python module) import)
+ ((@ (language python module) Module)
+ ',(append '(language python module) path))
+ ,(exp vs (car ids)))))))))))
ids as))))
(#:for