diff options
Diffstat (limited to 'TurtleArt/talogo.py')
-rw-r--r-- | TurtleArt/talogo.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py index 29d05d9..8acc1b8 100644 --- a/TurtleArt/talogo.py +++ b/TurtleArt/talogo.py @@ -188,10 +188,14 @@ class LogoCode: return sym def run_blocks(self, code): + """Run code generated by generate_code(). + """ self.start_time = time() self._setup_cmd(code) def generate_code(self, blk, blocks): + """ Generate code to be passed to run_blocks() from a stack of blocks. + """ for k in self.stacks.keys(): self.stacks[k] = None self.stacks['stack1'] = None @@ -849,7 +853,9 @@ class LogoCode: def _expand_forever(self, b, blk, blocks): """ Expand a while or until block into: forever, ifelse, stopstack - Expand a forever block to run in a separate stack """ + Expand a forever block to run in a separate stack + Parameters: the loop block, the top block, all blocks. + Return the start block of the expanded loop, and all blocks.""" # TODO: create a less brittle way of doing this; having to # manage the connections and flows locally means we may run |