From e48a412ff5243f03ebbb75daede281bd3621714f Mon Sep 17 00:00:00 2001 From: Marion Date: Mon, 19 Aug 2013 10:30:42 +0000 Subject: simplify code for turning an action stack into pseudocode --- diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py index 5fdb9fd..33d6834 100644 --- a/TurtleArt/talogo.py +++ b/TurtleArt/talogo.py @@ -244,10 +244,9 @@ class LogoCode: for b in blocks: if b.name in ('hat', 'hat1', 'hat2'): stack_name = get_stack_name(b) - if (b.connections is not None and len(b.connections) > 1 and - stack_name): - code = self._blocks_to_code(b) + if stack_name: stack_key = self._get_stack_key(stack_name) + code = self._blocks_to_code(b) self.stacks[stack_key] = self._readline(code) else: self.tw.showlabel('#nostack') -- cgit v0.9.1