This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients dirn, eric.smith, gregory.p.smith, paul.moore, serhiy.storchaka, steven.daprano, xtreak
Date 2019-05-04.11:52:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556970772.05.0.649953662623.issue36774@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-05-04 11:52:52eric.smithsetrecipients: + eric.smith, gregory.p.smith, paul.moore, steven.daprano, dirn, serhiy.storchaka, xtreak
2019-05-04 11:52:52eric.smithsetmessageid: <1556970772.05.0.649953662623.issue36774@roundup.psfhosted.org>
2019-05-04 11:52:52eric.smithlinkissue36774 messages
2019-05-04 11:52:51eric.smithcreate