Surprise using the 'is' operator
skip at pobox.com
skip at pobox.com
Tue Sep 26 16:14:26 EDT 2006
Wesley> as a side note, the ints that are cached (for current versions
Wesley> of Python) are in range(-1, 100)... is this documented
Wesley> somewhere?
Other than the code, probably not. Since it's an implementation
optimization, I see no particular reason that it should be documented
elsewhere. Hmmm... It would be interesting if we had a buildbot which
through a series of slightly twisty C macros built an interpreter that
eliminates the free list altogether to make sure nothing depends on its
presence or size.
Skip
More information about the Python-list
mailing list