Skip to content

Commit 557b6a8

Browse files
committed
Fix odd characters from copy/paste of cpython docstrings
1 parent a26f382 commit 557b6a8

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

adafruit_turtle.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def forward(self, distance):
210210

211211
def backward(self, distance):
212212
"""Move the turtle backward by distance, opposite to the direction the turtle is headed.
213-
Does not change the turtles heading.
213+
Does not change the turtle's heading.
214214
215215
:param distance: how far to move (integer or float)
216216
"""
@@ -220,7 +220,7 @@ def backward(self, distance):
220220
back = backward
221221

222222
def degrees(self, fullcircle=360):
223-
"""Set angle measurement units, i.e. set number of degrees for a full circle.
223+
"""Set angle measurement units, i.e. set number of "degrees" for a full circle.
224224
Default value is 360 degrees.
225225
226226
:param fullcircle: the number of degrees in a full circle
@@ -256,7 +256,7 @@ def goto(self, x1, y1=None):
256256
"""If y1 is None, x1 must be a pair of coordinates or an (x, y) tuple
257257
258258
Move turtle to an absolute position. If the pen is down, draw line.
259-
Does not change the turtles orientation.
259+
Does not change the turtle's orientation.
260260
261261
:param x1: a number or a pair of numbers
262262
:param y1: a number or None
@@ -324,7 +324,7 @@ def goto(self, x1, y1=None):
324324
setposition = goto
325325

326326
def setx(self, x):
327-
"""Set the turtles first coordinate to x, leave second coordinate
327+
"""Set the turtle's first coordinate to x, leave second coordinate
328328
unchanged.
329329
330330
:param x: new value of the turtle's x coordinate (a number)
@@ -333,7 +333,7 @@ def setx(self, x):
333333
self.goto(x, self.pos()[1])
334334

335335
def sety(self, y):
336-
"""Set the turtles second coordinate to y, leave first coordinate
336+
"""Set the turtle's second coordinate to y, leave first coordinate
337337
unchanged.
338338
339339
:param y: new value of the turtle's y coordinate (a number)
@@ -359,7 +359,7 @@ def setheading(self, to_angle):
359359
seth = setheading
360360

361361
def home(self):
362-
"""Move turtle to the origin coordinates (0,0) and set its heading to
362+
"""Move turtle to the origin - coordinates (0,0) - and set its heading to
363363
its start-orientation
364364
(which depends on the mode, see mode()).
365365
"""
@@ -368,7 +368,7 @@ def home(self):
368368

369369
def circle(self, radius, extent=None, steps=None):
370370
"""Draw a circle with given radius. The center is radius units left of
371-
the turtle; extent an angle determines which part of the circle is
371+
the turtle; extent - an angle - determines which part of the circle is
372372
drawn. If extent is not given, draw the entire circle. If extent is not
373373
a full circle, one endpoint of the arc is the current pen position.
374374
Draw the arc in counterclockwise direction if radius is positive,
@@ -414,7 +414,7 @@ def clearstamp(self, stampid):
414414
raise NotImplementedError
415415

416416
def clearstamps(self, n=None):
417-
"""Delete all or first/last n of turtles stamps. If n is None, delete
417+
"""Delete all or first/last n of turtle's stamps. If n is None, delete
418418
all stamps, if n > 0 delete first n stamps, else if n < 0 delete last
419419
n stamps.
420420
@@ -430,17 +430,17 @@ def undo(self):
430430
raise NotImplementedError
431431

432432
def speed(self, speed=None):
433-
"""Set the turtles speed to an integer value in the range 0..10. If no
433+
"""Set the turtle's speed to an integer value in the range 0..10. If no
434434
argument is given, return current speed.
435435
436436
If input is a number greater than 10 or smaller than 0.5, speed is set
437437
to 0. Speedstrings are mapped to speedvalues as follows:
438438
439-
fastest: 0
440-
fast: 10
441-
normal: 6
442-
slow: 3
443-
slowest: 1
439+
"fastest": 0
440+
"fast": 10
441+
"normal": 6
442+
"slow": 3
443+
"slowest": 1
444444
445445
Speeds from 1 to 10 enforce increasingly faster animation of line
446446
drawing and turtle turning.
@@ -457,12 +457,12 @@ def speed(self, speed=None):
457457
####################
458458
# Tell turtle's state
459459
def pos(self):
460-
"""Return the turtles current location (x,y) (as a Vec2D vector)."""
460+
"""Return the turtle's current location (x,y) (as a Vec2D vector)."""
461461
return Vec2D(self._x - self._w // 2, self._h // 2 - self._y)
462462
position = pos
463463

464464
def clear(self):
465-
"""Delete the turtles drawings from the screen. Do not move turtle.
465+
"""Delete the turtle's drawings from the screen. Do not move turtle.
466466
State and position of the turtle as well as drawings of other turtles
467467
are not affected.
468468
"""
@@ -478,24 +478,24 @@ def clear(self):
478478
time.sleep(0.1)
479479

480480
def heading(self):
481-
"""Return the turtles current heading (value depends on the turtle mode, see mode())."""
481+
"""Return the turtle's current heading (value depends on the turtle mode, see mode())."""
482482
return self._heading
483483

484484
# Pen control
485485
def pendown(self):
486-
"""Pull the pen down drawing when moving."""
486+
"""Pull the pen down - drawing when moving."""
487487
self._penstate = True
488488
pd = pendown
489489
down = pendown
490490

491491
def penup(self):
492-
"""Pull the pen up no drawing when moving."""
492+
"""Pull the pen up - no drawing when moving."""
493493
self._penstate = False
494494
pu = penup
495495
up = penup
496496

497497
def isdown(self):
498-
"""Return True if pen is down, False if its up."""
498+
"""Return True if pen is down, False if it's up."""
499499
return self._penstate
500500

501501
def pencolor(self, c=None):
@@ -514,13 +514,13 @@ def pencolor(self, c=None):
514514

515515
def mode(self, mode=None):
516516
"""
517-
Set turtle mode (standard”, “logo or world) and perform reset.
517+
Set turtle mode ("standard", "logo" or "world") and perform reset.
518518
If mode is not given, current mode is returned.
519519
520-
Mode standard is compatible with old turtle.
521-
Mode logo is compatible with most Logo turtle graphics.
520+
Mode "standard" is compatible with old turtle.
521+
Mode "logo" is compatible with most Logo turtle graphics.
522522
523-
:param mode: one of the strings standard or logo"
523+
:param mode: one of the strings "standard" or "logo"
524524
"""
525525
if mode == "standard":
526526
self._logomode = False

0 commit comments

Comments
 (0)