Oct-04-2020, 09:23 AM
(Oct-04-2020, 08:48 AM)Gribouillis Wrote: If you doimport turtle as t
, thent
is the turtle module. If you doimport turtle; t = turtle.Turtle()
, thent
is an instance of theturtle.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).
Crystal clear!
thx,
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.