[issue5749] Allow bin() to have an optional "Total Bits" argument.

2009-04-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with closing this one. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue5749] Allow bin() to have an optional "Total Bits" argument.

2009-04-13 Thread R. David Murray
R. David Murray added the comment: A better (more flexible) way already exists (as of 2.6) to accomplish your goal: >>> "0b{0:08b}".format(127) '0b0111' -- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed _

[issue5749] Allow bin() to have an optional "Total Bits" argument.

2009-04-13 Thread MechPaul
New submission from MechPaul : As it stands right now, bin() only shows the minimum number of bits to display the number, however I think having a "Total Bits" argument would be very, very useful for bin(). bin(value, [Total bits to display]) "Total bits to display" is an integer. Here's how i