summaryrefslogtreecommitdiff
path: root/modules/language/python/list.scm
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-05-14 17:59:41 +0200
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-05-14 17:59:41 +0200
commit0a2045050517a2317083bd2ec17bae09e03c4a11 (patch)
treeece44c18b30283919feacce9d166c4cf8cce1d78 /modules/language/python/list.scm
parent876d5d0fca204adce5335c5486bf6fb3d2188f22 (diff)
further improvements
Diffstat (limited to 'modules/language/python/list.scm')
-rw-r--r--modules/language/python/list.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/language/python/list.scm b/modules/language/python/list.scm
index e488e45..78b141e 100644
--- a/modules/language/python/list.scm
+++ b/modules/language/python/list.scm
@@ -116,11 +116,17 @@
(to-pylist (string->list o)))
(define-method (bool (o <py-list>))
- (not (= (len o) 0)))
+ (if (= (len o) 0)
+ #f
+ o))
(define-method (bool (o <vector>))
- (not (= (len o) 0)))
+ (if (= (len o) 0)
+ #f
+ o))
(define-method (bool (o <string>))
- (not (= (len o) 0)))
+ (if (= (len o) 0)
+ #f
+ o))
(define-method (to-pylist l)
(if (null? l)