Message373738
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.
Calling
```
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:41 | Charles Machalow | set | recipients:
+ Charles Machalow |
2020-07-16 04:17:41 | Charles Machalow | set | messageid: <1594873061.38.0.656587142662.issue41312@roundup.psfhosted.org> |
2020-07-16 04:17:41 | Charles Machalow | link | issue41312 messages |
2020-07-16 04:17:40 | Charles Machalow | create | |
|