Integer arithmetic

Grant Edwards grante at visi.com
Tue Mar 25 18:31:27 EST 2003


In article <Pine.GSO.4.44.0303251456231.4060-100000 at amy3.Stanford.EDU>, Daniel Timothy Bentley wrote:

> Am I so far off in thinking maybe this should be provided by
> the language? Some way to create an int, using some (perhaps
> implementation-defined) method of changing a long to an int?
> Some way to ensure that I don't misguess on what themask is?
> What if I'm programming on a machine with 36 bit longs?  Or
> where 64 bits is the atomic datatype? It seems like there
> should be an int constructor that won't overflow in this case.

For some of what I do, it sure would be nice to have 8, 16, and
32 bit base-2 datatypes available.  One of these days I should
write a C extension providing fixed-width data types...

-- 
Grant Edwards                   grante             Yow!  ... the MYSTERIANS
                                  at               are in here with my
                               visi.com            CORDUROY SOAP DISH!!




More information about the Python-list mailing list