Message 341732 - Python tracker

Message341732

Author eric.smith
Recipients barry, eric.smith, larry, levkivskyi, serhiy.storchaka
Date 2019-05-07.14:18:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557238683.71.0.0177172202352.issue36817@roundup.psfhosted.org>
In-reply-to
Content
After discussing this with Guido and Larry, we're going to go with the "implicit format mode", as outlined by Serhiy, and drop the !f feature.

So the rules are:
{x=} -> "x="+repr(x)
{x=:.2f} -> "x="+format(x, ".2f")
{x=:} -> "x="+format(x, "")
{x=:!s:20} -> "x="+format(str(x), "20")
{x=:!r:20} -> "x="+format(repr(x), "20")

I think the 95% case will be {x=}, the 99%+ case will be {x=:2f} case. So I'm happy with this outcome. All functionality you had available with !f is still available, but with slightly different spellings. The most common cases now have the shortest spellings.
History
Date User Action Args
2019-05-07 14:18:03eric.smithsetrecipients: + eric.smith, barry, larry, serhiy.storchaka, levkivskyi
2019-05-07 14:18:03eric.smithsetmessageid: <1557238683.71.0.0177172202352.issue36817@roundup.psfhosted.org>
2019-05-07 14:18:03eric.smithlinkissue36817 messages
2019-05-07 14:18:03eric.smithcreate