On Mon, 2006-01-16 at 20:49 -0800, Bob Ippolito wrote:
The only bases I've ever really had a good use for are 2, 8, 10, and 16. There are currently formatting codes for 8 (o), 10 (d, u), and 16 (x, X). Why not just add a string format code for unsigned binary? The obvious choice is probably "b".
For example:
'%08b' % (12)
'00001100'
'%b' % (12)
'1100'
+1
-Barry