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 serhiy.storchaka
Recipients dirn, eric.smith, gregory.p.smith, serhiy.storchaka, steven.daprano, xtreak
Date 2019-05-02.16:30:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
To implement converting printf-style string formatting into f-string expressions (see issue28307) I need to add new convertors:

'd': int(x) where x is a number, used for %d, %u, %i
'i': operator.index(i), used for %x, %o, %b
'f': float(x) where x is a number, used for %f, %g, %e

They may be private, only exposed in the AST between optimizer and code generator. But they can also be supported by Python grammar and str.format() if there is a use case for this.

If 'd' be used for other purposes, I will need to find other character for converting a number to integer (with possible truncation). Any suggestions?
Date User Action Args
2019-05-02 16:30:53serhiy.storchakasetrecipients: + serhiy.storchaka, gregory.p.smith, eric.smith, steven.daprano, dirn, xtreak
2019-05-02 16:30:53serhiy.storchakasetmessageid: <>
2019-05-02 16:30:53serhiy.storchakalinkissue36774 messages
2019-05-02 16:30:52serhiy.storchakacreate