bpo-29104: Fixed parsing backslashes in f-strings.#490
Merged
serhiy-storchaka merged 4 commits intopython:masterfrom May 25, 2017
Merged
bpo-29104: Fixed parsing backslashes in f-strings.#490serhiy-storchaka merged 4 commits intopython:masterfrom
serhiy-storchaka merged 4 commits intopython:masterfrom
Conversation
ericvsmith
requested changes
May 22, 2017
Member
ericvsmith
left a comment
There was a problem hiding this comment.
Other than my one comment, this looks good to me. Thanks!
Lib/test/test_fstring.py
Outdated
| self.assertEqual(f'\\{6*7}', '\\42') | ||
| self.assertEqual(fr'\{6*7}', '\\42') | ||
|
|
||
| AMPERSAND = 123 |
Member
There was a problem hiding this comment.
It took me literally an hour to figure out what's going on here.
Can you change this line to something:
AMPERSAND = ord('{') # =123: Make sure we get the right unicode character (&), and not pick up local variable
Member
Author
There was a problem hiding this comment.
The value is arbitrary. I didn't meant ord('{').
Member
There was a problem hiding this comment.
Right. But the important part (to me) that I missed is that it's not equal to ord('&'). I had assumed it was, and that somehow that value was being used to produce the '&' in the output. But the point is that the value of the local AMPERSAND is not being used, correct?
If so, how about using 0, since most people by inspection know it's not an &?
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this pull request
May 25, 2017
(cherry picked from commit 0cd7a3f)
serhiy-storchaka
added a commit
that referenced
this pull request
May 25, 2017
jaraco
pushed a commit
that referenced
this pull request
Dec 2, 2022
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.12.1 to 3.0.0. - [Release notes](https://github.com/pytest-dev/pytest-cov/releases) - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](pytest-dev/pytest-cov@v2.12.1...v3.0.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
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.
No description provided.