Message282710
I see, I hadn't appreciated fstrings where entirely different and more powerful than format(), I'll close this.
For anyone else coming to this, with fstrings in >=3.6 you can do:
In [4]: value = [1,2, 3]
In [5]: f'The value is {value}.'
Out[5]: 'The value is [1, 2, 3].'
In [6]: f'The value is {len(value)}.'
Out[6]: 'The value is 3.' |
|
Date |
User |
Action |
Args |
2016-12-08 15:25:12 | samuelcolvin | set | recipients:
+ samuelcolvin, r.david.murray |
2016-12-08 15:25:12 | samuelcolvin | set | messageid: <1481210712.4.0.432312389966.issue28904@psf.upfronthosting.co.za> |
2016-12-08 15:25:12 | samuelcolvin | link | issue28904 messages |
2016-12-08 15:25:12 | samuelcolvin | create | |
|