MCPcopy Index your code
hub / github.com/python/cpython / left

Method left

Lib/turtle.py:1748–1767  ·  view source on GitHub ↗

Turn turtle left by angle units. Aliases: left | lt Argument: angle -- a number (integer or float) Turn turtle left by angle units. (Units are by default degrees, but can be set via the degrees() and radians() functions.) Angle orientation depends o

(self, angle)

Source from the content-addressed store, hash-verified

1746 self._rotate(-angle)
1747
1748 def left(self, angle):
1749 """Turn turtle left by angle units.
1750
1751 Aliases: left | lt
1752
1753 Argument:
1754 angle -- a number (integer or float)
1755
1756 Turn turtle left by angle units. (Units are by default degrees,
1757 but can be set via the degrees() and radians() functions.)
1758 Angle orientation depends on mode. (See this.)
1759
1760 Example (for a Turtle instance named turtle):
1761 >>> turtle.heading()
1762 22.0
1763 >>> turtle.left(45)
1764 >>> turtle.heading()
1765 67.0
1766 """
1767 self._rotate(angle)
1768
1769 def pos(self):
1770 """Return the turtle's current location (x,y), as a Vec2D-vector.

Callers 15

test_distance_methodMethod · 0.95
demo2Function · 0.80
test_leftMethod · 0.80
test_forwardMethod · 0.80
test_headingMethod · 0.80
test_positionsMethod · 0.80
test_homeMethod · 0.80
wheelMethod · 0.80
tripieceMethod · 0.80
pentpieceMethod · 0.80
pentlMethod · 0.80

Calls 1

_rotateMethod · 0.95

Tested by 7

test_distance_methodMethod · 0.76
test_leftMethod · 0.64
test_forwardMethod · 0.64
test_headingMethod · 0.64
test_positionsMethod · 0.64
test_homeMethod · 0.64