Content-Length: 283603 | pFad | https://github.com/python/cpython/issues/126349

6A Turtle context managers for `fill`, `poly` and `tracer` · Issue #126349 · python/cpython · GitHub
Skip to content

Turtle context managers for fill, poly and tracer #126349

@yngvem

Description

@yngvem

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/126349

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy