Author Charles Machalow
Recipients Charles Machalow
Date 2020-07-16.04:17:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Right now in str.format(), we have !s, !r, and !a to allow us to call str(), repr(), and ascii() respectively on the given expression.

I'm proposing that we add a !p conversion to have pprint.pformat() be called to convert the given expression to a 'pretty' string.

print(f"My dict: {d!p}")

is a lot more concise than:

import pprint
print(f"My dict: {pprint.pformat(d)}")

We may even be able to have a static attribute stored to change the various default kwargs of pprint.pformat().
Date User Action Args
2020-07-16 04:17:41Charles Machalowsetrecipients: + Charles Machalow
2020-07-16 04:17:41Charles Machalowsetmessageid: <>
2020-07-16 04:17:41Charles Machalowlinkissue41312 messages
2020-07-16 04:17:40Charles Machalowcreate