| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Not sure why test.test_tokenize.TestRoundtrip.test_random_files fails on test_pprint.py? If I replace t-strings by f-strings it pass, is it an issue with the test not handling t-strings? Or a real issue with tokenizer round-trippring and t-strings? Edit: looks like a real problem, I have a MRE, opening an issue soon |
Sorry, something went wrong.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
I've updated this PR to fix the merge conflict, add support for the new expand=True from #136964, and add this to What's New. >>> from pprint import pp
>>> name = "World"
>>> pp(t"Hello {name}")
Template(strings=('Hello ', ''),
interpolations=(Interpolation('World', 'name', None, ''),))
>>> pp(t"Hello {name}", expand=True)
Template(
strings=('Hello ', ''),
interpolations=(Interpolation('World', 'name', None, ''),),
) |
Sorry, something went wrong.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Handle formatting of Template and Interpolation types in pprint functions:
Very straightforward, using existing PrettyPrinter helper methods.
To avoid slowing import time, I did not import Template and Interpolation from string.templatelib, but instead copied their (very simple) definition:
cpython/Lib/string/templatelib.py
Lines 8 to 11 in 99a9ab1