"Clemens Hepper" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> It's strange: python seem to cache constants from 0 to 99: The Python specification allows but does not require such behind-the-scenes implementation optimization hacks. As released, CPython 2.4 caches -5 to 99, I believe. In 2.5, the upper limit was increased to 256. The limits are in a pair of #define statements in the int object source file. Anyone who compiles from source can adjust as desired (though the corresponding test will fail unless also adjusted ;-). I think the visibility of this implementation detail from Python code is an example of a leaky abstraction. For more, see http://www.joelonsoftware.com/articles/LeakyAbstractions.html Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list