This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients docs@python, eric.smith, serhiy.storchaka, vstinner, wolma
Date 2016-03-11.08:51:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457686296.97.0.907974070086.issue26506@psf.upfronthosting.co.za>
In-reply-to
Content
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, ...)
History
Date User Action Args
2016-03-11 08:51:37serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, eric.smith, docs@python, wolma
2016-03-11 08:51:36serhiy.storchakasetmessageid: <1457686296.97.0.907974070086.issue26506@psf.upfronthosting.co.za>
2016-03-11 08:51:36serhiy.storchakalinkissue26506 messages
2016-03-11 08:51:36serhiy.storchakacreate