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

Delaney, Timothy C (Timothy) tdelaney at avaya.com
Fri Aug 13 01:20:43 CEST 2004


Gareth McCaughan wrote:

I don't think this is a good reason for rejecting "integer" as the name of the common supertype of int and long. You'd use isinstance(x,integer) to check whether x is an integer of built-in type, just as you currently use isinstance(x,float) to check whether x is a floating-point number of built-in type. I see no reason why a cumbersome name is much advantage.

All this brings to mind - is there actually a good reason to need a base type? Why not just define baseinteger as:

baseinteger = int, long

if the only reason for it is to use isinstance?

Tim Delaney



More information about the Python-Dev mailing list