On Tue, 2006-01-17 at 20:25 -0800, Guido van Rossum wrote:
On 1/17/06, Bob Ippolito
wrote: There shouldn't be a %B for the same reason there isn't an %O or %D -- they're all just digits, so there's not a need for an uppercase [...]
so %b is "binary", +1
The difference between hex() and oct() and the proposed binary() is
I'd propose bin() to stay in line with the short abbreviated names. [...]
+1
The binary type should have a 0b prefix. [...]
+1
For those who argue "who would ever use it?", I would :-)
Note that this does not support and is independent of supporting
arbitrary bases. I don't think we need to support arbitrary bases, but
if we did I would vote for ".precision" to mean ".base" for "%d"... ie;
"%3.3d" % 5 == " 12"
I think supporting arbitrary bases for floats is way overkill and not
worth considering.
--
Donovan Baarda