diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-08-13 18:24:39 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-08-13 18:24:39 +0200 |
commit | 416d6a21da49e8779cb43399f78b550c9711ec9e (patch) | |
tree | d7b805b37a2df4cac6dfb5f5686d0ef880b0f187 /modules/language/python/module.scm | |
parent | 1b613ce68d8d1e3d9d80a243288d2662cc8d78b3 (diff) |
some improvements
Diffstat (limited to 'modules/language/python/module.scm')
-rw-r--r-- | modules/language/python/module.scm | 18 |
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) |