Skip to content

Commit

Permalink
Added docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bystroushaak committed Oct 22, 2019
1 parent 5e82d76 commit b1c42bf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/tinySelf/vm/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b1c42bf

Please sign in to comment.