donkirkby / live-py-plugin

Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
https://donkirkby.github.io/live-py-plugin
MIT License
291 stars 57 forks source link

Undo turtle move #361

Closed donkirkby closed 2 years ago

donkirkby commented 2 years ago

What I did

Tried to undo a turtle move after forcing a new line by changing the pen.

import turtle as t

t.forward(50)
t.right(90)
t.forward(20)
t.pensize(5)
t.undo()
t.undo()

t.mainloop()

What happened

An error on the turtle canvas:

AttributeError: 'Canvas' object has no attribute 'type'

What I wanted to happen

Draw the horizontal line, but not the vertical one, like the regular turtle does.

My environment

Describe the versions of everything you were using: