is operator

Matt Nordhoff mnordhoff at mattnordhoff.com
Mon Mar 10 11:11:12 CET 2008


castironpi at gmail.com wrote:
>> I believe Python automatically creates and caches int objects for 0-256,
>> so whenever you use them, they refer to the same exact objects. Since
>> ints are immutable, it doesn't matter.
> 
> One of the biggest hits on start-up time, by the way.  ;)

Well, the developers clearly decided it was worth it at the time. Who
knows, perhaps that's changed since then.
-- 



More information about the Python-list mailing list