summaryrefslogtreecommitdiff
path: root/modules/language/python/string.scm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/language/python/string.scm')
-rw-r--r--modules/language/python/string.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/language/python/string.scm b/modules/language/python/string.scm
index 7d5bdd7..4261a0a 100644
--- a/modules/language/python/string.scm
+++ b/modules/language/python/string.scm
@@ -292,7 +292,7 @@
(()
(string-trim s))
((x . _)
- (let ((l (map (lambda (x) (if (string? x) (string-ref x 0) x)) l)))
+ (let ((l (map (lambda (x) (if (string? x) (string-ref x 0) x)) (to-list x))))
(string-trim s (lambda (ch) (member ch l)))))))
(define-py (py-rstrip rstrip s . l)
@@ -300,7 +300,8 @@
(()
(string-trim-right s))
((x . _)
- (let ((l (map (lambda (x) (if (string? x) (string-ref x 0) x)) x)))
+ (let ((l (map (lambda (x) (if (string? x) (string-ref x 0) x))
+ (to-list x))))
(string-trim-right s (lambda (ch) (member ch l)))))))
(define-py (py-partition partition s (sep <string>))