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

[Python-Dev] str with base

[Python-Dev] str with baseThomas Wouters thomas at xs4all.net
Wed Jan 18 00:28:43 CET 2006
On Tue, Jan 17, 2006 at 09:23:29AM -0500, Jason Orendorff wrote:

> I think a method 5664400.to_base(13) sounds nice.
[And others suggested int-methods too]

I would like to point out that this is almost, but not quite, entirely as
inapropriate as using str(). Integers don't have a base. String
representations of integers -- and indeed, numbers in general, as the Python
tutorial explains in Appendix B -- have a base. Adding such a method to
integers (and, I presume, longs) would beg the question why floats, Decimals
and complex numbers don't have them.

In-favour-of-%2b-ly y'rs,
-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
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