diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-05-14 17:59:41 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-05-14 17:59:41 +0200 |
commit | 0a2045050517a2317083bd2ec17bae09e03c4a11 (patch) | |
tree | ece44c18b30283919feacce9d166c4cf8cce1d78 /modules/language/python/list.scm | |
parent | 876d5d0fca204adce5335c5486bf6fb3d2188f22 (diff) |
further improvements
Diffstat (limited to 'modules/language/python/list.scm')
-rw-r--r-- | modules/language/python/list.scm | 12 |
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) |