Re: What other languages use the same data model as Python?
- From: Neil Cerutti <neilc@xxxxxxxxxxx>
- Date: 5 May 2011 13:19:43 GMT
On 2011-05-04, John Nagle <nagle@xxxxxxxxxxx> 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.
--
Neil Cerutti
.
- Follow-Ups:
- Re: What other languages use the same data model as Python?
- From: Terry Reedy
- Re: What other languages use the same data model as Python?
- References:
- What other languages use the same data model as Python?
- From: Steven D'Aprano
- Re: What other languages use the same data model as Python?
- From: Devin Jeanpierre
- Re: What other languages use the same data model as Python?
- From: Steven D'Aprano
- Re: What other languages use the same data model as Python?
- From: John Nagle
- What other languages use the same data model as Python?
- Prev by Date: Re: : PiCloud - really cool!
- Next by Date: PIL: The _imaging C module is not installed
- Previous by thread: Re: What other languages use the same data model as Python?
- Next by thread: Re: What other languages use the same data model as Python?
- Index(es):