8000 gh-65276: Fixed Turtle library circle method bug by liam-gersten · Pull Request #104022 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-65276: Fixed Turtle library circle method bug #104022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Save and restore fix
  • Loading branch information
liam-gersten committed Apr 30, 2023
commit cac85cb9527304e761342f6e479eb933a062fdf6
14 changes: 13 additions & 1 deletion Lib/turtle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,19 @@ def circle(self, radius, extent = None, steps = None):
self._rotate(w)
self._rotate(-w2)
if speed == 0:
self._tracer(tr, dl)
previous_values = []
for t in self.screen.turtles():
if t == self:
continue
value_tuple = (t, t._shown, t._hidden_from_screen)
t._shown = False
t._hidden_from_screen = True
previous_values.append(value_tuple)
self._tracer(flag=tr, delay=dl)
for values in previous_values:
t, _shown, _hidden_from_screen = values
t._shown = _shown
t._hidden_from_screen = _hidden_from_screen
self.speed(speed)
if self.undobuffer:
self.undobuffer.cumulate = False
Expand Down
0