[issue14694] Option to show leading zeros for bin/hex/oct

Mark Dickinson report at bugs.python.org
Sun Apr 29 18:15:22 CEST 2012

Mark Dickinson <dickinsm at gmail.com> added the comment:

-1. str.format already does this quite effectively;  I don't see a real need to complicate the bin, hex and oct signatures.

>>> '{:016b}'.format(324)
>>> '{:016o}'.format(324)
>>> '{:016x}'.format(324)

nosy: +mark.dickinson

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list