-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation
#100326
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
base: main
Are you sure you want to change the base?
Conversation
Doc/library/functions.rst
Outdated
|
|
||
| See :func:`ast.literal_eval` for a function that can safely evaluate strings | ||
| with expressions containing only literals. | ||
| .. versionchanged:: 3.11 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ast.literal_eval is still referred to as safe by the documentation for evalast.literal_eval is safe in eval documentation
| See :func:`ast.literal_eval` for a function that can "safely" evaluate strings | ||
| with expressions containing only literals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| See :func:`ast.literal_eval` for a function that can "safely" evaluate strings | |
| with expressions containing only literals. | |
| See :func:`ast.literal_eval` for a function to evaluate strings | |
| with expressions containing only literals. |
gh-100305: Changed the doc referencing to
literal_evalin eval as it was misleading asliteral_evalwas said safe