From b1c42bf261919fbe2e4e33c1db3686210c6e31b3 Mon Sep 17 00:00:00 2001 From: Bystroushaak Date: Tue, 22 Oct 2019 17:21:52 +0200 Subject: [PATCH] Added docstrings. #125 --- src/tinySelf/vm/frames.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tinySelf/vm/frames.py b/src/tinySelf/vm/frames.py index ad01cd9..da74969 100644 --- a/src/tinySelf/vm/frames.py +++ b/src/tinySelf/vm/frames.py @@ -265,6 +265,11 @@ def next_process(self): self.cycler = 0 def stash_push(self): + """ + Stash all processes and context and run just current code. + + Used for eval() implementation, that is for immediate evaluation. + """ copy = ProcessCycler() copy.cycler = self.cycler copy.process = self.process @@ -279,6 +284,11 @@ def stash_push(self): self.processes = [] def stash_pop(self): + """ + Unstash processes and whole context. + + Used for eval() implementation, that is for immediate evaluation. + """ copy = self.stash.pop() self.cycler = copy.cycler