[Python-Dev] %b format?

Eric S. Raymond esr@thyrsus.com
Wed, 30 May 2001 18:05:09 -0400


Tim Peters <tim.one@home.com>:
> -0, due to compound lumpiness:  hex() is to %x is to __hex__ as oct() is to
> %o is to __oct__ as nothing is to %b is to nothing.  In that respect it's
> unfortunate that Python has distinct nb_oct and nb_hex slots in the
> PyNumberMethods struct (as opposed to a single parameterized "convert to
> base N string" method).

Is the right answer to add the convert-to-base slot and deprecate the
other two?
-- 
		<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>

If gun laws in fact worked, the sponsors of this type of legislation
should have no difficulty drawing upon long lists of examples of
criminal acts reduced by such legislation. That they cannot do so
after a century and a half of trying -- that they must sweep under the
rug the southern attempts at gun control in the 1870-1910 period, the
northeastern attempts in the 1920-1939 period, the attempts at both
Federal and State levels in 1965-1976 -- establishes the repeated,
complete and inevitable failure of gun laws to control serious crime.
        -- Senator Orrin Hatch, in a 1982 Senate Report