gh-123614: Add save function to turtle.py#123617
Merged
hauntsaninja merged 12 commits intopython:mainfrom Sep 13, 2024
Merged
Conversation
Co-authored-by: Marie Roald <roald.marie@gmail.com>
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Co-authored-by: Marie Roald <roald.marie@gmail.com>
Contributor
|
Could you add documentation? And I would raise |
Co-authored-by: Yngve Mardal Moe <yngve.m.moe@gmail.com>
Co-authored-by: Yngve Mardal Moe <yngve.m.moe@gmail.com>
Co-authored-by: Yngve Mardal Moe <yngve.m.moe@gmail.com>
Contributor
|
We have updated the documentation now and changed the code to use the |
hauntsaninja
reviewed
Sep 4, 2024
yngvem
commented
Sep 5, 2024
hugovk
reviewed
Sep 5, 2024
Misc/NEWS.d/next/Core_and_Builtins/2024-09-02-20-39-10.gh-issue-123614.26TMHp.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This was referenced Oct 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
save(filename: str, overwrite: bool = False)-function toturtle.pywith the following input validation:FileNotFoundErrorthat explicitly state that the directory is missing if someone tries to save to an non-existing directoryValueErrorif the file exists andoverwrite=FalseValueErrorif the file does not end withpsorepsCo-authored-by: Marie Roald 3594989+MarieRoald@users.noreply.github.com