[Python-Dev] Is PEP 237 final -- Unifying Long Integers and Integers

Guido van Rossum gvanrossum at gmail.com
Sun Jun 26 16:56:47 CEST 2005


[me]
> > (c) The right place to do the overflow checks is in the API wrappers,
> > not in the integer types.

[Keith Dart]
> That would be the "traditional" method.
> 
> I was trying to keep it an object-oriented API. What should "know" the
> overflow condition is the type object itself. It raises OverFlowError any
> time this occurs, for any operation, implicitly. I prefer to catch errors
> earlier, rather than later.

Isn't clear to me at all. I might compute a value using some formula
that exceeds 2**32 in some intermediate result but produces an
in-range value in the end. That should be acceptable as an argument. I
also don't see why one approach is more OO than another; sounds like
you have a case of buzzworditis. :-)

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


More information about the Python-Dev mailing list