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/059841.html below:

[Python-Dev] str with base

[Python-Dev] str with base [Python-Dev] str with baseArmin Rigo arigo at tunes.org
Tue Jan 17 19:09:05 CET 2006
Hi Alex,

> Is it finally time in Python 2.5 to allow the "obvious" use of, say,
> str(5,2) to give '101', just the converse of the way int('101',1)
> gives 5?

+1.  That's obvious enough for me.  Clearly it should only work with int
and long arguments, just like int(x,base) only works if x is a str or
unicode argument (and not something that can be converted to a string,
or even a stringish type for some definition of stringish).


Armin
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