From 0280351488bdeb8b7c66562bb9975f0f43349467 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 26 Nov 2025 21:33:02 -0300 Subject: [PATCH] [Fixed][IfElifElse] Lazy evaluation of elif_key Fixes #33 --- src/basic_data_handling/control_flow_nodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/basic_data_handling/control_flow_nodes.py b/src/basic_data_handling/control_flow_nodes.py index 21c80c1..18cdda2 100644 --- a/src/basic_data_handling/control_flow_nodes.py +++ b/src/basic_data_handling/control_flow_nodes.py @@ -101,6 +101,10 @@ def check_lazy_status(self, **kwargs) -> list[str]: if elif_key not in kwargs: break + if kwargs.get(elif_key) is None: + needed.append(elif_key) + return needed + # If this elif condition is true and its value is None, add it to needed if kwargs.get(elif_key, False) and kwargs.get(then_key) is None: needed.append(then_key)