A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-January/059880.html below:

[Python-Dev] str with base

[Python-Dev] str with base [Python-Dev] str with baseDonovan Baarda abo at minkirri.apana.org.au
Wed Jan 18 13:16:20 CET 2006
On Tue, 2006-01-17 at 20:25 -0800, Guido van Rossum wrote:
> On 1/17/06, Bob Ippolito <bob at redivi.com> 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 <abo at minkirri.apana.org.au>
http://minkirri.apana.org.au/~abo/

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4