Oct-04-2020, 08:48 AM
(This post was last modified: Oct-04-2020, 08:49 AM by Gribouillis.)
If you do
Things are somewhat complicated by the fact that the turtle module implements a procedure-oriented interface (without explicit creation of a Turtle instance) and an object-oriented interface. If you want to be consistent with the rest of python, choose the the object-oriented interface, that is to say, create your own Turtle instance and work with it (that's where you say that you can do anything you want).
import turtle as t
, then t
is the turtle module. If you do import turtle; t = turtle.Turtle()
, then t
is an instance of the turtle.Turtle
class. The module and the class have different members.Things are somewhat complicated by the fact that the turtle module implements a procedure-oriented interface (without explicit creation of a Turtle instance) and an object-oriented interface. If you want to be consistent with the rest of python, choose the the object-oriented interface, that is to say, create your own Turtle instance and work with it (that's where you say that you can do anything you want).