summaryrefslogtreecommitdiff
path: root/modules/language/python/string.scm
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-03-27 16:19:00 +0200
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-03-27 16:19:00 +0200
commit944fc50b8b36455b9749ad6b60f3020d466f901c (patch)
treeabbbfdda0c84a10609a5ddda5d3940733db75f7e /modules/language/python/string.scm
parent1c4e6def8285e0740461b732c78c74ed3345f524 (diff)
large part of functools compiles
Diffstat (limited to 'modules/language/python/string.scm')
-rw-r--r--modules/language/python/string.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/language/python/string.scm b/modules/language/python/string.scm
index 9563ad0..11a9737 100644
--- a/modules/language/python/string.scm
+++ b/modules/language/python/string.scm
@@ -7,6 +7,7 @@
#:use-module (language python list)
#:use-module (language python exceptions)
#:use-module (language python for)
+ #:use-module (language python bool)
#:use-module (language python persist)
#:export (py-format py-capitalize py-center py-endswith
py-expandtabs py-find py-rfind
@@ -55,6 +56,9 @@
(define-py0 (pylist-ref s i)
(list->string (list (string-ref s i))))
+(define-py0 (bool s)
+ (not (= (len s) 0)))
+
(define-py (py-capitalize capitalize s)
(let* ((n (len s))
(w (make-string n)))