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.scm26
1 files changed, 14 insertions, 12 deletions
diff --git a/modules/language/python/string.scm b/modules/language/python/string.scm
index a189d84..ad80a87 100644
--- a/modules/language/python/string.scm
+++ b/modules/language/python/string.scm
@@ -601,18 +601,20 @@
(define-python-class string (<py-string>)
(define __init__
(case-lambda
- ((self s . l)
- (cond
- ((is-a? s <py-string>)
- (slot-ref s 'str))
- ((is-a? s <string>)
- s)
- ((b? s)
- (apply b-decode s l))
- (else
- (aif it (ref s '__str__)
- (it)
- (__init__ self ((@ (guile) format) #f "~a" s))))))))
+ ((self)
+ "")
+ ((self s . l)
+ (cond
+ ((is-a? s <py-string>)
+ (slot-ref s 'str))
+ ((is-a? s <string>)
+ s)
+ ((b? s)
+ (apply b-decode s l))
+ (else
+ (aif it (ref s '__str__)
+ (it)
+ (__init__ self ((@ (guile) format) #f "~a" s))))))))
(define __new__