From 849a818d07e91d73f8a9373f8bbea597e37eb0ae Mon Sep 17 00:00:00 2001 From: Stefan Israelsson Tampe Date: Wed, 12 Sep 2018 21:49:43 +0200 Subject: imporved relative imports --- modules/language/python/compile.scm | 6 +++--- 1 file 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)))) -- cgit v1.2.3