[Python-Dev] Type of range object members (original) (raw)

Guido van Rossum guido at python.org
Wed Aug 16 01:38:31 CEST 2006


On 8/15/06, James Y Knight <foom at fuhm.net> wrote:

On Aug 15, 2006, at 7:06 PM, Guido van Rossum wrote: >> There's no particular reason that a short int must be able to store >> the entire range of C "long", so, as many bits can be stolen from it >> as desired. > > There isn't? Actually a lot of APIs currently assumen that.

I thought we were talking about Py3k. IF the idea is to integrate both short/long ints into a single type, with only an internal distinction (which is what is being discussed), all those APIs are broken already. The particular internal division of the new int object between short and long doesn't matter. Which is all I was saying. If combining all integers into a single type isn't actually desired, then neither my message nor Martin's is relevant.

As I said before, at the C level I expect the distinction between int and long to be alive and well. Changing it so that ints don't have the full range of the corresponding C type would be painful IMO.

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list