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 eric.smith, serhiy.storchaka
Date 2016-09-29.10:44:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475145859.32.0.825907015459.issue28307@psf.upfronthosting.co.za>
In-reply-to
Content
'%s' % x should be translated to f'{x!s}', not to f'{x:s}'. Only %s, %r and %a can be supported. Formatting with %i should left untranslated. Or maybe translate '%r: %i' % (a, x) to f'{a!r}: {"%i" % x}'.

It is possible also to introduce special opcodes that converts argument to exact int or float. Then '%06i' % x could be translated to f'{__exact_int__(x):06}'.
History
Date User Action Args
2016-09-29 10:44:19serhiy.storchakasetrecipients: + serhiy.storchaka, eric.smith
2016-09-29 10:44:19serhiy.storchakasetmessageid: <1475145859.32.0.825907015459.issue28307@psf.upfronthosting.co.za>
2016-09-29 10:44:19serhiy.storchakalinkissue28307 messages
2016-09-29 10:44:19serhiy.storchakacreate