diff options
-rw-r--r-- | modules/language/python/bytes.scm | 2 | ||||
-rw-r--r-- | modules/language/python/completer.scm | 2 | ||||
-rw-r--r-- | modules/language/python/module/io.scm | 2 | ||||
-rw-r--r-- | modules/language/python/spec.scm | 4 | ||||
-rw-r--r-- | modules/language/python/string.scm | 2 |
5 files changed, 7 insertions, 5 deletions
diff --git a/modules/language/python/bytes.scm b/modules/language/python/bytes.scm index e3d8245..6e08300 100644 --- a/modules/language/python/bytes.scm +++ b/modules/language/python/bytes.scm @@ -1052,7 +1052,7 @@ (reverse (let lp ((s s) (r '())) (let ((l (py-partition s old))) - (if (equal? (cadr l) "") + (if (string-null? (cadr l)) (cons s r) (lp (list-ref l 2) (cons (car l) r)))))) n diff --git a/modules/language/python/completer.scm b/modules/language/python/completer.scm index 73f96bd..047248e 100644 --- a/modules/language/python/completer.scm +++ b/modules/language/python/completer.scm @@ -38,7 +38,7 @@ (set! strs d) (set! pp p) (set! regexp (string-append - "^" (if (equal? t "") + "^" (if (string-null? t) "[^_]" (regexp-quote t)))) (compl text #t))) diff --git a/modules/language/python/module/io.scm b/modules/language/python/module/io.scm index 3c7809c..e48abcf 100644 --- a/modules/language/python/module/io.scm +++ b/modules/language/python/module/io.scm @@ -536,7 +536,7 @@ (define __init__ (lam (self (= initial_value "") (= newline "\n")) (set self 'newline newline) - (if (equal? initial_value "") + (if (string-null? initial_value) (set self '_port (open-output-string)) (set self '_port (open-input-string initial_value))))) diff --git a/modules/language/python/spec.scm b/modules/language/python/spec.scm index 7814d2c..ea545ac 100644 --- a/modules/language/python/spec.scm +++ b/modules/language/python/spec.scm @@ -31,7 +31,9 @@ (define (c int x) (pr (comp int (pr (p (pr x)))))) (define (cc int port x) - (if (equal? x "") (read port) (c int x))) + (if (string-null? x) + (read port) + (c int x))) (define (e x) (eval (c #t x) (current-module))) diff --git a/modules/language/python/string.scm b/modules/language/python/string.scm index b3708b5..26b3482 100644 --- a/modules/language/python/string.scm +++ b/modules/language/python/string.scm @@ -361,7 +361,7 @@ (reverse (let lp ((s s) (r '())) (let ((l (py-partition s old))) - (if (equal? (cadr l) "") + (if (string-null? (cadr l)) (cons s r) (lp (list-ref l 2) (cons (car l) r)))))) new))) |