What other languages use the same data model as Python?
Terry Reedy
tjreedy at udel.edu
Thu May 5 14:39:28 EDT 2011
On 5/5/2011 9:19 AM, Neil Cerutti wrote:
> On 2011-05-04, John Nagle<nagle at animats.com> wrote:
>> That's a quirk of CPython's boxed number implementation. All
>> integers are boxed, but there's a set of canned objects for
>> small integers. CPython's range for this is -5 to +256,
>> incidentally. That's visible through the "is" operator.
>> Arguably, it should not be.
>
> But that's the sole purpose of the is operator. You either expose
> those details, or you don't have an is operator at all.
Which is to say, the CPython testsuite has a CPython-specific
implementation test that uses 'is' to test that implementation detail.
--
Terry Jan Reedy
More information about the Python-list
mailing list