[issue6783] Add a builtin method to 'int' for base/radix conversion

Yuv Gre report at bugs.python.org
Thu Aug 27 09:03:23 CEST 2009


Yuv Gre <ubershmekel at gmail.com> added the comment:

Use case - 'hashing' a counter for example like video ID's in youtube. 
One could use a regular int internally and publish a shorter 62-base id 
for links.

Guido said on http://mail.python.org/pipermail/python-dev/2006-
January/059923.html
"I think we ought to let this sit for a while and come back to it in a
few week's time. Is 'base' really the right name? It could just as
well be considered a conversion in the other direction. In common
usage, 'base' and 'radix' are about synonymous (except no-one uses
radix). Pethaps the 2nd argument should not be a keyword argument?

Also, this discussion made me wonder if conversions using other bases
than 10 should even be built-ins. A library module seems a more
appropriate place"

I'm hoping 182 weeks of clarity could help iron this issue out.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6783>
_______________________________________


More information about the Python-bugs-list mailing list