[Python-Dev] Unifying Long Integers and Integers: baseint (original) (raw)

Gareth McCaughan gmccaughan at synaptics-uk.com
Thu Aug 12 14:06:58 CEST 2004


On Wednesday 2004-08-11 22:02, Michael Chermside wrote:

I would like to urge caution before making this change. Despite what the PEP may say, I actually think that creating a 'baseint' type is the WRONG design choice for the long term. I envision an eventual Python which has just one type, called 'int'. The fact that an efficient implementation is used when the ints are small and an arbitrary-precision version when they get too big would be hidden from the user by automatic promotion of overflow. (By "hidden" I mean the user doesn't need to care, not that they can't find out if they want to.) We are almost there already, but if people start coding to 'baseinteger' it takes us down a different path entirely. 'basestring' is a completely different issue -- there will always be a need for both unicode and 8-bit-strings as separate types.

This is why "integer" is a better name than "baseinteger". For now it can be the common supertype of int and long. In the future, it can be the name of the single integer type.

-- g



More information about the Python-Dev mailing list