From c3d4c7aa82aece3e05ff7fc47de5c63df445b672 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Tue, 29 May 2018 13:26:02 -0700 Subject: [PATCH] Clean up `else` compilation in `while` --- hy/compiler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hy/compiler.py b/hy/compiler.py index 3d584e6..fe47c9b 100755 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -1342,9 +1342,8 @@ class HyASTCompiler(object): orel = Result() if else_expr is not None: - for else_body in else_expr: - orel += self.compile(else_body) - orel += orel.expr_as_stmt() + orel = self._compile_branch(else_expr) + orel += orel.expr_as_stmt() body = self._compile_branch(body) body += body.expr_as_stmt()