Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turtle context managers for fill, poly and tracer #126349

Open
yngvem opened this issue Nov 3, 2024 · 0 comments
Open

Turtle context managers for fill, poly and tracer #126349

yngvem opened this issue Nov 3, 2024 · 0 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@yngvem
Copy link
Contributor

yngvem commented Nov 3, 2024

Feature or enhancement

Proposal:

When I taught Python with Turtle, I always had to find other examples when I got to context managers. This is a shame, as there are several places in the Turtle module where context managers make sense. The most obvious places (in my opinion) are:

  • turtle.begin_fill() / turtle.end_fill()
  • turtle.begin_poly() / turtle.end_poly()
  • turtle.tracer(0) / turtle.tracer(1) (disable animations)

@MarieRoald and I plan to submit a PR about this shortly

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/improving-the-turtle-library/61840

Linked PRs

@yngvem yngvem added the type-feature A feature request or enhancement label Nov 3, 2024
@picnixz picnixz added the stdlib Python modules in the Lib dir label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
Status: No status
Development

No branches or pull requests

2 participants