Skip to content

gh-84464: Clarify how the signs of radius and extent affect turtle.circle() - #157978

Open
Stewyn wants to merge 1 commit into
python:mainfrom
Stewyn:gh-84464-turtle-circle-docs
Open

Stewyn wants to merge 1 commit into
python:mainfrom
Stewyn:gh-84464-turtle-circle-docs

Conversation

@Stewyn

@Stewyn Stewyn commented Sep 23, 2026

Copy link
Copy Markdown

The turtle.circle() docs say the arc is drawn counterclockwise whenever radius is positive. That's only true when extent is positive too: a negative extent makes the turtle move backward along the circle, which reverses the direction.

Behavior for each sign combination (standard mode, starting at the origin facing east):

call direction center heading after
circle(50, 90) counterclockwise left +90
circle(50, -90) clockwise left −90
circle(-50, 90) clockwise right −90
circle(-50, -90) counterclockwise right +90

This PR updates both Doc/library/turtle.rst and the docstring to:

  • say that the center is to the right of the turtle when radius is negative
  • explain that the sign of extent decides forward or backward movement, so the arc is counterclockwise only when radius and extent have the same sign
  • correct the final heading (the turtle turns right by extent when radius is negative)

The wording is intentionally short, following the review feedback on the earlier attempt, gh-20928, which was closed as stale.

…tle.circle()

The docs said the arc is drawn counterclockwise whenever radius is
positive, but a negative extent makes the turtle move backward and
reverses the direction. Also state where the center is for a negative
radius and how the final heading depends on the sign of radius.
@python-cla-bot

python-cla-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34710352 | 📁 Comparing 1507d11 against main (b0dda15)

  🔍 Preview build  

2 files changed
± library/turtle.html
± whatsnew/changelog.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant