| :func:`resizemode`
| :func:`shapesize` | :func:`turtlesize`
| :func:`shearfactor`
- | :func:`settiltangle`
| :func:`tiltangle`
| :func:`tilt`
| :func:`shapetransform`
>>> turtle.fd(50)
-.. function:: settiltangle(angle)
-
- :param angle: a number
-
- Rotate the turtleshape to point in the direction specified by *angle*,
- regardless of its current tilt-angle. *Do not* change the turtle's heading
- (direction of movement).
-
- .. doctest::
- :skipif: _tkinter is None or 'always; deprecated method'
-
- >>> turtle.reset()
- >>> turtle.shape("circle")
- >>> turtle.shapesize(5,2)
- >>> turtle.settiltangle(45)
- >>> turtle.fd(50)
- >>> turtle.settiltangle(-45)
- >>> turtle.fd(50)
-
- .. deprecated:: 3.1
-
-
.. function:: tiltangle(angle=None)
:param angle: a number (optional)
:func:`get_shapepoly` have been added. Thus the full range of
regular linear transforms is now available for transforming turtle shapes.
:func:`tiltangle` has been enhanced in functionality: it now can
- be used to get or set the tilt angle. :func:`settiltangle` has been
- deprecated.
+ be used to get or set the tilt angle.
- The :class:`Screen` method :func:`onkeypress` has been added as a complement to
:func:`onkey`. As the latter binds actions to the key release event,
* Remove support for using :class:`pathlib.Path` objects as context managers.
This functionality was deprecated and made a no-op in Python 3.9.
+* Remove the :meth:`!turtle.RawTurtle.settiltangle` method,
+ deprecated in docs since Python 3.1
+ and with a deprecation warning since Python 3.11.
+ (Contributed by Hugo van Kemenade in :gh:`104876`.)
+
* Removed the following :mod:`unittest` functions, deprecated in Python 3.11:
* :func:`!unittest.findTestCases`
* :meth:`unittest.TestLoader.loadTestsFromTestCase`
* :meth:`unittest.TestLoader.getTestCaseNames`
- (Contributed by Hugo van Kemenade in :gh:`104835`.)
-
* :pep:`594`: Remove the :mod:`!cgi`` and :mod:`!cgitb` modules,
deprecated in Python 3.11.
'isvisible', 'left', 'lt', 'onclick', 'ondrag', 'onrelease', 'pd',
'pen', 'pencolor', 'pendown', 'pensize', 'penup', 'pos', 'position',
'pu', 'radians', 'right', 'reset', 'resizemode', 'rt',
- 'seth', 'setheading', 'setpos', 'setposition', 'settiltangle',
+ 'seth', 'setheading', 'setpos', 'setposition',
'setundobuffer', 'setx', 'sety', 'shape', 'shapesize', 'shapetransform', 'shearfactor', 'showturtle',
'speed', 'st', 'stamp', 'teleport', 'tilt', 'tiltangle', 'towards',
'turtlesize', 'undo', 'undobufferentries', 'up', 'width',
return self._shearfactor
self.pen(resizemode="user", shearfactor=shear)
- def settiltangle(self, angle):
- """Rotate the turtleshape to point in the specified direction
-
- Argument: angle -- number
-
- Rotate the turtleshape to point in the direction specified by angle,
- regardless of its current tilt-angle. DO NOT change the turtle's
- heading (direction of movement).
-
- Deprecated since Python 3.1
-
- Examples (for a Turtle instance named turtle):
- >>> turtle.shape("circle")
- >>> turtle.shapesize(5,2)
- >>> turtle.settiltangle(45)
- >>> turtle.stamp()
- >>> turtle.fd(50)
- >>> turtle.settiltangle(-45)
- >>> turtle.stamp()
- >>> turtle.fd(50)
- """
- warnings._deprecated("turtle.RawTurtle.settiltangle()",
- "{name!r} is deprecated since Python 3.1 and scheduled "
- "for removal in Python {remove}. Use tiltangle() instead.",
- remove=(3, 13))
- self.tiltangle(angle)
-
def tiltangle(self, angle=None):
"""Set or return the current tilt-angle.
between the orientation of the turtleshape and the heading of the
turtle (its direction of movement).
- (Incorrectly marked as deprecated since Python 3.1, it is really
- settiltangle that is deprecated.)
-
Examples (for a Turtle instance named turtle):
>>> turtle.shape("circle")
>>> turtle.shapesize(5, 2)