A RetroSearch Logo

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

Search Query:

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

[Python-Dev] str with base

[Python-Dev] str with baseBob Ippolito bob at redivi.com
Thu Jan 19 08:58:01 CET 2006
On Jan 18, 2006, at 11:37 PM, Neal Norwitz wrote:

> On 1/18/06, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
>> Guido, we may be converging on a consensus for my proposal:
>>
>>     base(value, radix=2)
>>
>> So far no one has shot at it, and it has gathered +1's from Steven,
>> Alex, Brett, and Nick.
>
> +1 for me too, but I'd also like to deprecate hex() and oct() and
> slate them for removal in 3k.
>
> To expand, valid radix values would be 2..36 (ie, same as for int).
> It was discussed putting base() in some module.  Was there consensus
> about builtin vs a module?  I'd prefer a module, but builtin is ok
> with me.

I'd drop the default radix, or make it something common like 16...  
especially if hex and oct are to be py3k deprecated.

+1 for: base(value, radix)
+1 for: "%b" % (integer,)
+0 for binary literals: 0b01101

-bob

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