Message261551
I agree with you and always prefer formatting strings.
Your example shows that at least an alternative to str.zfill() should be mentioned in the educational purposes.
With C-style formatting your example can be written more laconically:
return "%0*x" % (length, ...) |
|
Date |
User |
Action |
Args |
2016-03-11 08:51:37 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, eric.smith, docs@python, wolma |
2016-03-11 08:51:36 | serhiy.storchaka | set | messageid: <1457686296.97.0.907974070086.issue26506@psf.upfronthosting.co.za> |
2016-03-11 08:51:36 | serhiy.storchaka | link | issue26506 messages |
2016-03-11 08:51:36 | serhiy.storchaka | create | |
|