Eric V. Smith <e...@trueblade.com> added the comment:

And for those who *really* want to be able to apply a format spec to the result 
of the entire !d expression, you can always use nested f-strings:

>>> for x in [3.1415, 0.5772156649, 100]:
...   print(f'{f"{x!d:.1f}":*^20}')
... 
*******x=3.1********
*******x=0.6********
******x=100.0*******

Not that I recommend this, but at least it's possible.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36774>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to