[Python-Dev] %b format?
Eric S. Raymond
esr@thyrsus.com
Wed, 30 May 2001 18:03:41 -0400
Barry A. Warsaw <barry@digicool.com>:
>
> >>>>> "GW" == Greg Wilson <Greg.Wilson@baltimore.com> writes:
>
> GW> I would like to add a "%b" format for converting numbers to
> GW> binary format (1's and 0's).
>
> For completeness, wouldn't you also want a binary integer literal so
> your students could write binary numbers in their code? And what
> about a binary() operator a la hex()?
Barry is correct. If we're going to do this, we ought to do it right and
support binary on a par with decimal, hex, and octal. I favor this.
--
<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>
The direct use of physical force is so poor a solution to the problem of
limited resources that it is commonly employed only by small children and
great nations.
-- David Friedman