Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6797767
WIP: Mostly works, except repr isn't called (so only string expressio…
ericvsmith May 2, 2019
93df017
WIP: Change !x to !d, to match an earlier discussion on python-ideas.
ericvsmith May 2, 2019
99283dc
Call repr on the resulting expression. Change expr_source to expr_text.
ericvsmith May 2, 2019
1b29503
Add simple tests.
ericvsmith May 2, 2019
2684897
Remove FVC_DEBUG, which I thought I was going to use for this feature…
ericvsmith May 2, 2019
42582d5
Fix some comments and formatting.
ericvsmith May 2, 2019
1ffa2a1
Added blurb.
ericvsmith May 2, 2019
14af246
Use quotes around the string result in the blurb text.
ericvsmith May 2, 2019
f985b10
Call out the conversion specifiers in monospace.
ericvsmith May 2, 2019
4556421
Note that the repr of the expression is used.
ericvsmith May 2, 2019
856485a
Fix conversion character.
ericvsmith May 2, 2019
a384516
Added Whats New entry.
ericvsmith May 2, 2019
6107b54
Don't allow format_spec with !d.
ericvsmith May 2, 2019
3f292c5
Test that we don't allow a format spec.
ericvsmith May 2, 2019
0046262
Use repr(expr) if no format spec, use format(expr, spec) if one is.
ericvsmith May 3, 2019
a697d02
Pre-append the '=' to the end of expr_text at compile time, instead o…
ericvsmith May 4, 2019
49d03e4
Add a coding comment, a note about why I'm using a unicode identifier…
ericvsmith May 4, 2019
f79e21d
Added tests for nested f-strings and for pre- and post-text.
ericvsmith May 4, 2019
ed82083
Add a test for newlines in expressions.
ericvsmith May 4, 2019
aeef3db
Clarify a comment.
ericvsmith May 4, 2019
caf3221
Change from di to =.
ericvsmith May 5, 2019
921d8a1
Fix a comment.
ericvsmith May 5, 2019
bd65ec1
Fix comment.
ericvsmith May 5, 2019
1acc386
Fix comments.
ericvsmith May 5, 2019
d46f83c
Skip all whitespace after the =, not just spaces. Handle unparsing.
ericvsmith May 6, 2019
abff2cb
Hack: Modify tests for f-string annotations. I'm not sure these are e…
ericvsmith May 6, 2019
75ef1ac
Add missing FVC_ASCII.
ericvsmith May 6, 2019
e688fbf
Move the mapping from "no converion specified" to the exact conversion
ericvsmith May 6, 2019
3e7e9ff
Make ast_unparse understand =.
ericvsmith May 6, 2019
6a39185
Add a test for !s.
ericvsmith May 6, 2019
e32563c
Improve comments.
ericvsmith May 6, 2019
9fe98cf
Update blurb for = syntax.
ericvsmith May 6, 2019
6c62fce
Fix whatsnew.
ericvsmith May 6, 2019
d453f03
Fix comments about FVC_ values.
ericvsmith May 6, 2019
bb7d2e2
Restored some f-string tests, this time without !f.
ericvsmith May 7, 2019
40231e6
Fix and improve a comment.
ericvsmith May 7, 2019
34c2cf9
Use Py_ISSPACE instead of isspace.
ericvsmith May 7, 2019
2dde0df
Fix parsing error with >= and <=. Add test for operators containing =.
ericvsmith May 7, 2019
92a0b1a
< and > without a trailing = don't end an expression.
ericvsmith May 7, 2019
0015f11
Add a clarifying comment about a test.
ericvsmith May 7, 2019
46d4611
Add tests for named parameters, to exercise the = parsing.
ericvsmith May 7, 2019
1bfb6e9
Improve the tests for named parameters.
ericvsmith May 7, 2019
5fa0eac
Fix a typo in a comment.
ericvsmith May 7, 2019
451cd27
Removed !f conversion. Switch to repr if using = and a format spec is…
ericvsmith May 7, 2019
8e5a7c5
Add more tests for = and repr/format.
ericvsmith May 7, 2019
8e73948
Fixed string annotations checks.
ericvsmith May 7, 2019
0ec4dae
Removed unreachable code left over from !f.
ericvsmith May 7, 2019
975f0f8
Removed 'f' type conversion.
ericvsmith May 7, 2019
19fb7fa
Fixed a spurious space.
ericvsmith May 7, 2019
c3a8f12
Fixed whitespace.
ericvsmith May 7, 2019
dba7421
Address review findings.
ericvsmith May 8, 2019
1a53ccd
Minor comments and variable renaming.
ericvsmith May 8, 2019
19dc0d0
bpo-36816: Update the self-signed.pythontest.net cert (GH-13192)
gpshead May 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Call out the conversion specifiers in monospace.
  • Loading branch information
ericvsmith committed May 2, 2019
commit f985b106251712ad4d334a2bcaaaa86e8d729bd7
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Add a !x conversion specifier to f-strings. This is similar to !s and !r. It
produces the text of the expression, followed by an equal sign, followed by
the value of the expression. So ``f'{3*9+15!d}'`` would be equal to the
string ``'3*9+15=42'``.
Add a ``!x`` conversion specifier to f-strings. This is similar to
``!s`` and ``!r``. It produces the text of the expression, followed by
an equal sign, followed by the value of the expression. So
``f'{3*9+15!d}'`` would be equal to the string ``'3*9+15=42'``.