diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-08-24 12:10:10 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-08-24 12:10:10 +0200 |
commit | 333a82328a53024f341a74a0f738ce0d6f0f6d4f (patch) | |
tree | c08fab7615e353ac11ba7e57642a40327cc56895 /modules/language/python/compile.scm | |
parent | ef9733fc94e4c99ed199cc9ac0695ca07985dc50 (diff) |
_csv module is tested
Diffstat (limited to 'modules/language/python/compile.scm')
-rw-r--r-- | modules/language/python/compile.scm | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm index 619ef1b..aec886b 100644 --- a/modules/language/python/compile.scm +++ b/modules/language/python/compile.scm @@ -175,8 +175,10 @@ ((#:cfor for-e in-e cont) (let lp ((for-e for-e)) (match for-e - (((#:power #f (#:tuple . l) . _)) - (lp l)) + (((#:sub l)) + `(,(F 'for) ((,@(map (lambda (x) (gv ((g vs exp) x))) l) + : ,(exp vs in-e))) () + ,(gen-sel vs cont item))) (_ `(,(F 'for) ((,@(map (lambda (x) (gv ((g vs exp) x))) for-e) : ,(exp vs in-e))) () @@ -2533,10 +2535,21 @@ (define (export-all) (define mod (current-module)) (if (module-defined? mod '__all__) - (module-export! mod + (begin + (module-export! mod (for ((x : (module-ref mod '__all__))) ((l '())) - (cons (string->symbol (scm-str x)) l) - #:final l)))) + (let ((x (string->symbol (scm-str x)))) + (if (module-locally-bound? mod x) + (cons x l) + l)) + #:final l)) + (module-re-export! mod + (for ((x : (module-ref mod '__all__))) ((l '())) + (let ((x (string->symbol (scm-str x)))) + (if (not (module-locally-bound? mod x)) + (cons x l) + l)) + #:final l))))) (define-syntax qset! (syntax-rules (cons quote) |