From ed604aca4497b693decf9dc9f56344f881248393 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 4 Jun 2019 12:54:14 +0200 Subject: eval: local-eval: Simplify. * modules/language/python/eval.scm (local-eval): Simplify. --- modules/language/python/eval.scm | 12 ++++++------ 1 file 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 '())) -- cgit v1.2.3