diff --git a/examples/dsl/__main__.py b/examples/dsl/__main__.py index 8ba15cf..af91ac5 100644 --- a/examples/dsl/__main__.py +++ b/examples/dsl/__main__.py @@ -64,8 +64,7 @@ def interactive_mode(parser): while cmd := input("Please enter command (Press to exit)\n"): if not cmd: break - res = parser.parse((cmd,)) - if res: + if res := parser.parse((cmd,)): print(res) @@ -91,8 +90,7 @@ def main(): interactive_mode(parser) return - res = parser.parse(cmds) - if res: + if res := parser.parse(cmds): print(res)