summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-06-04 12:54:14 +0200
committerRicardo Wurmus <rekado@elephly.net>2019-06-04 12:54:14 +0200
commited604aca4497b693decf9dc9f56344f881248393 (patch)
tree58a7d709392db38204e17fa4fc840244517e2f3d /modules
parent447b4b5430639cc6f2f7d716d459488b5761d11c (diff)
eval: local-eval: Simplify.
* modules/language/python/eval.scm (local-eval): Simplify.
Diffstat (limited to 'modules')
-rw-r--r--modules/language/python/eval.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/language/python/eval.scm b/modules/language/python/eval.scm
index 3849b35..0d5d9d9 100644
--- a/modules/language/python/eval.scm
+++ b/modules/language/python/eval.scm
@@ -105,15 +105,15 @@
(GlobalModuleWrap mod))
-(define* (local-eval x locals globals)
+(define (local-eval x locals globals)
"Evaluate the expression @var{x} within the local environment @var{local} and
global environment @var{global}."
(if locals
- (if globals
- (apply (seval ((L local-wrap) x locals) globals)
- ((L env-boxes) locals))
- (apply (seval ((L local-wrap) x locals) ((L env-module) locals))
- ((L env-boxes) locals)))
+ (apply (seval ((L local-wrap) x locals)
+ (if globals
+ globals
+ ((L env-module) locals)))
+ ((L env-boxes) locals))
(seval x (current-module))))
(define* (local-compile x locals globals #:key (opts '()))