diff options
Diffstat (limited to 'modules/language/python/module/python.scm')
-rw-r--r-- | modules/language/python/module/python.scm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/language/python/module/python.scm b/modules/language/python/module/python.scm index 02f4e5e..69e02b0 100644 --- a/modules/language/python/module/python.scm +++ b/modules/language/python/module/python.scm @@ -25,7 +25,7 @@ #:use-module (language python tuple ) #:use-module (language python eval ) - #:replace (list abs min max hash round) + #:replace (list abs min max hash round format) #:re-export (StopIteration GeneratorExit RuntimeError Exception ValueError TypeError @@ -38,10 +38,10 @@ compile exec type object ) - #:export (print repr complex float int + #:export (print repr complex float int str set all any bin callable reversed chr classmethod staticmethod - divmod enumerate filter format + divmod enumerate filter getattr hasattr hex isinstance issubclass iter map sum id input oct ord pow super sorted zip)) @@ -50,13 +50,13 @@ (define print (case-lambda - (() (format #t "~%")) - ((x) (format #t "~s~%" x)) - (l (format #t "~s~%" l)))) + (() ((@ (guile) format) #t "~%")) + ((x) ((@ (guile) format) #t "~s~%" x)) + (l ((@ (guile) format) #t "~s~%" l)))) -(define (repr x) (format #f "~a" x)) +(define (repr x) ((@ (guile) format) #f "~a" x)) (define abs py-abs) -(define string pystring) +(define str pystring) (define complex py-complex) (define float py-float) (define int py-int) @@ -77,17 +77,17 @@ (define-method (callable (x <primitive-generic>)) #t) (define-method (callable (x <p>)) (ref x '__call__)) - + (define chr integer->char) - + (define classmethod class-method) (define staticmethod static-method) (define (enumerate l) (make-generator enumerate - (lambda (yield) - (for ((x : l)) ((i 0)) - (yield i x) + (lambda (yield) + (for ((x : l)) ((i 0)) + (yield i x) (+ i 1))))) (define (filter f l) |