[go: nahoru, domu]

Skip to content

Commit

Permalink
Use _ as the last result in repl
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Jan 2, 2024
1 parent 50b2506 commit e8c028c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions auto_editor/subcommands/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def main(sys_args: list[str] = sys.argv[1:]) -> None:
for result in interpret(env, parser):
if result is not None:
sys.stdout.write(f"{print_str(result)}\n")
env["_"] = result

except ClosingError:
continue # Allow user to continue adding text
except (MyError, ZeroDivisionError) as e:
Expand Down

0 comments on commit e8c028c

Please sign in to comment.