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

Guido van Rossum gvanrossum at gmail.com
Tue Jun 21 12:19:04 CEST 2005


On 6/20/05, Keith Dart <kdart at kdart.com> wrote:
> However, since it is sometimes necessary to interface to other systems
> with Python, I see no reason why Python should not have a full set of
> built in numeric types corresponding to the machine types and, in turn,
> other system types. Then it would be easier (and probaby a bit faster)
> to interface to them. Perhaps Python could have an "integer" type for
> long/int unified types, and just "int" type as "normal" integers?

Strongly disagree.

(a) Stop worrying about speed. The overhead of a single Python
bytecode execution is probably more than the cost of an integer
operation in most cases.

(b) I don't know what you call a "normal" integer any more; to me,
unified long/int is as normal as they come. Trust me, that's the case
for most users. Worrying about 32 bits becomes less and less normal.

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

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


More information about the Python-Dev mailing list