diff options
author | Marion <marion.zepf@gmail.com> | 2013-08-19 10:30:42 (GMT) |
---|---|---|
committer | Marion <marion.zepf@gmail.com> | 2013-08-19 10:30:42 (GMT) |
commit | e48a412ff5243f03ebbb75daede281bd3621714f (patch) | |
tree | 70fb4de6c1a66f400a4bfe5fe07fc5f9cc45521b | |
parent | 8b6a5eb47e2a6b8c3802ec6c409d3157157babb5 (diff) |
simplify code for turning an action stack into pseudocode
-rw-r--r-- | TurtleArt/talogo.py | 5 |
1 files changed, 2 insertions, 3 deletions
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') |