int/long unification hides bugs

Cliff Wells clifford.wells at
Tue Oct 26 07:03:13 CEST 2004

On Mon, 2004-10-25 at 21:05 -0700, kartik wrote:
> > The question is how small is small? Less than 2**7? Less than 2**15? 
> > Less than 2**31? Less than 2**63? And what's the significance of powers 
> > of two? And what happens if you move from a 32 bit machine to a 64 bit 
> > one? (or a 1024 bit one in a hundred years time?)
> less than 2**31 most of the time & hardly ever greater than 2**63 - no
> matter if my machine is 32-bit, 64-bit or 1024-bit. the required range
> depends on the data   u want 2 store in the variable & not on the
> hardware.

I'm going to rewrite that last line in English so that perhaps you'll
catch on to what you are saying:

the required range depends on the data you want to store in the variable
and not on the hardware.

The pivotal word here is "you".  The data *you* want to store.  One more
time YOU.  I'm not correcting your mangling of English at this point,
rather I'm pointing out that it's *you*, not Python, that knows what
sort of data *you* want to store.  If *you* want to limit your integers
to some arbitrary amount then *you* are going to have to write code to
do that.  What *you* need for *your* application isn't necessarily what
anyone else needs for theirs.

If you want such a domain-specific language then you should take a look
at as I think that's the only language
that's going to suit you.

Cliff Wells <clifford.wells at>

More information about the Python-list mailing list