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

convert f strings to concat #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

graingert
Copy link

@graingert graingert commented Jun 5, 2017

This is a bit closer to how the actual 3.6 implementation works

@graingert graingert force-pushed the patch-1 branch 2 times, most recently from 141038e to e953705 Compare June 5, 2017 18:51
@@ -4,9 +4,10 @@

@pytest.mark.parametrize('before, after', [
("f'hi'", "'hi'"),
("f'hi {x}'", "''.join(['hi ', '{}'.format(x)])"),
("f'hi {x}'", "'hi ' + '{}'.format(x)"),
("d = f'{a} {b}!'", "d = '{}'.format(a) + ' ' + '{}'.format(b) + '!'"),
Copy link
Author

Choose a reason for hiding this comment

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

can't work out why this becomes:

d = 
'{}'.format(a) + ' ' + '{}'.format(b) + '!'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant