summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-09-12 21:49:43 +0200
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-09-12 21:49:43 +0200
commit849a818d07e91d73f8a9373f8bbea597e37eb0ae (patch)
tree0f9501f1636a0f4f85f591699981009dd180be2e
parente41b5160334b9e4195c55300fd9bc1901dec1d43 (diff)
imporved relative imports
-rw-r--r--modules/language/python/compile.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm
index 394e8d9..821389c 100644
--- a/modules/language/python/compile.scm
+++ b/modules/language/python/compile.scm
@@ -413,7 +413,7 @@
((#:global . _)
vs)
- ((#:import (#:name ((ids ...) . as) ...) ...)
+ ((#:import (#:name ((_ ids ...) . as) ...) ...)
(let lp ((ids ids) (as as) (vs vs))
(if (pair? ids)
(let lp2 ((ids2 (car ids)) (as2 (car as)) (vs vs))
@@ -502,7 +502,7 @@
vs)
((#:global . _)
vs)
- ((#:import (#:name ((ids ...) . as)) ...)
+ ((#:import (#:name ((_ ids ...) . as)) ...)
(let lp ((ids ids) (as as) (vs vs))
(if (pair? as)
(lp (cdr ids) (cdr as)
@@ -1392,7 +1392,7 @@
,@(map (lambda (dots ids as)
(let* ((u (module-name (current-module)))
(u (reverse (list-cdr-ref (reverse (u-it u))
- (length dots))))
+ (- (length dots) 1))))
(path (append (if (null? dots) '() u)
(map (g vs exp) ids))))