summaryrefslogtreecommitdiff
path: root/modules/language/python/module.scm
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-08-13 18:24:39 +0200
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-08-13 18:24:39 +0200
commit416d6a21da49e8779cb43399f78b550c9711ec9e (patch)
treed7b805b37a2df4cac6dfb5f5686d0ef880b0f187 /modules/language/python/module.scm
parent1b613ce68d8d1e3d9d80a243288d2662cc8d78b3 (diff)
some improvements
Diffstat (limited to 'modules/language/python/module.scm')
-rw-r--r--modules/language/python/module.scm18
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/language/python/module.scm b/modules/language/python/module.scm
index 3453a25..aacf3a1 100644
--- a/modules/language/python/module.scm
+++ b/modules/language/python/module.scm
@@ -61,8 +61,8 @@
((ref it '__update__) pre l nm)
(rawset self id (Module pre l nm)))
#f)))
-
- (define __init__
+
+ (define __init__
(case-lambda
((self pre l nm)
(match l
@@ -85,11 +85,15 @@
(list-ref l 1)
(list-ref l 2))
'(language python module)))
- (__init__ self (reverse '(language python module)) (cdddr l) '())
- #f)
+ (__init__ self (reverse '(language python module)) (cdddr l)
+ '())
+ (__init__ self '() l '()))
(__init__ self
- (map string->symbol
- (string-split l #\.)))))))
+ (append
+ '(language python module)
+ (map string->symbol
+ (string-split l #\.))))))))
+
(define __update__
(case-lambda
((self pre l nm)
@@ -221,7 +225,7 @@
(else
#f)) a ...)))))
-(define (m? x) ((@ (language python module python) isinstance) x Module))
+(define (m? x) ((@ (language python module _python) isinstance) x Module))
(define (import-f x f . l)
(if x
(if (m? x)