3 ms·
Wow! Really? (I'm not a Pythonator.) Same reasoning as Java?
by Jabbles 16y ago
Wow! Really? (I'm not a Pythonator.)
Same reasoning as Java?
- reinhardt 16y agoBasically yes, although it is not part of the language definition and should not be relied on. It's just an implementation artifact of CPython, and not only that but the threshold of which integers are cached changes for different Python versions.