summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2019-03-13 18:45:39 +0100
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2019-03-13 18:45:39 +0100
commit935de07402608eebc9ce63fe04f64e90cc53debd (patch)
tree39f41a354acd98f33883abd0b5ff988fdff6e46e
parent26b8e6d6040df10093b0ede3a2ac04b3f1c8a22b (diff)
remove define in expression context
-rw-r--r--modules/language/python/spec.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/language/python/spec.scm b/modules/language/python/spec.scm
index 4b05cbf..8f39e0c 100644
--- a/modules/language/python/spec.scm
+++ b/modules/language/python/spec.scm
@@ -21,10 +21,11 @@
(define dolog #f)
(define (pr . x)
(when dolog
- (define port (open-file "log.txt" "a"))
- (with-output-to-port port
- (lambda ()
- (pretty-print x) (car (reverse x))))
+ (let ()
+ (define port (open-file "log.txt" "a"))
+ (with-output-to-port port
+ (lambda ()
+ (pretty-print x) (car (reverse x)))))
(close port))
(car (reverse x)))