Skip to content

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


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
ContributorAuthor

@ramvikramsramvikramsDec 20, 2022

Choose a reason for hiding this comment

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

done

@slatenyslateny requested a review from gpsheadDecember 20, 2022 08:07
@slatenyslateny changed the title gh-100305: ast.literal_eval is still referred to as safe by the documentation for evalgh-100305: Deemphasize that ast.literal_eval is safe in eval documentationDec 20, 2022
Comment on lines +557 to 558
See :func:`ast.literal_eval` for a function that can "safely" evaluate strings
with expressions containing only literals.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviewdocsDocumentation in the Doc dirskip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants

@ramvikrams@merwok@slateny@bedevere-bot