This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mbussonn
Recipients eric.smith, mbussonn, pablogsal
Date 2019-05-22.17:47:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CANJQusUmMA-CQkFPhX+_-QLkeifrdFYvFbaqzgTGyBRvxL6tBQ@mail.gmail.com>
In-reply-to <[email protected]>
Content
I thought it was comparing the AST of the file to the AST of the unparsed
AST.

So it's actually checking if parse(unparse(x)) is indempotent and not
wether parse(unparse(x)) is indempotent.

So x={x!r} should be fine.

On Wed, May 22, 2019, 09:22 Pablo Galindo Salgado <[email protected]>
wrote:

>
> Pablo Galindo Salgado <[email protected]> added the comment:
>
> Notice that test_tools will fail if  f'{x=}' becomes f'x={x!r}' when
> unparsed as it compares the text of the file and the text of the roundtrip
> of the ast of the file
>
> ----------
> nosy: +pablogsal
>
> _______________________________________
> Python tracker <[email protected]>
> <https://bugs.python.org/issue37003>
> _______________________________________
>
History
Date User Action Args
2019-05-22 17:47:18mbussonnsetrecipients: + mbussonn, eric.smith, pablogsal
2019-05-22 17:47:18mbussonnlinkissue37003 messages
2019-05-22 17:47:18mbussonncreate