You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a use for a context manager with no closing (nothing after the yield)?
For this use-case would it be more straightforward to have something like:
defoffscreen_turtle():
"""a turtle that doesn't show a drawing window."""tk=tkinter.Tk()
tk.withdraw()
trtl=turtle.RawTurtle(tkinter.Canvas(master=tk))
trtl.screen.tracer(0, 0) # remove delays by disabling animationreturntrtltrtl=offscreen_turtle()
trtl.begin_poly()
...
Adapted from me and @snoyer:
Still need to add some explanatory comments.
Inspired by https://mathcurve.com/courbes2d.gb/giration/motifs.shtml
The text was updated successfully, but these errors were encountered: