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

gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation #100326

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ramvikrams
Copy link
Contributor

gh-100305: Changed the doc referencing to literal_eval in eval as it was misleading as literal_eval was said safe

@@ -554,8 +554,9 @@ are always available. They are listed here in alphabetical order.
If the given source is a string, then leading and trailing spaces and tabs
are stripped.

See :func:`ast.literal_eval` for a function that can safely evaluate strings
with expressions containing only literals.
.. versionchanged:: 3.11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about saying 'version changed', as it seems to imply that only 3.11 has the change, but 3.10 also has it as it was backported (see PR). I'd say it's okay to just keep the original format and adjust the wording.

Copy link
Contributor Author

@ramvikrams ramvikrams Dec 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@slateny slateny requested a review from gpshead December 20, 2022 08:07
@slateny slateny changed the title gh-100305: ast.literal_eval is still referred to as safe by the documentation for eval gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants