Apr-01-2017, 05:58 PM
What's the source? What different, other than semantics, are they claiming? The difference can be important in other languages.
I wouldn't say Python has primitives. Even ints are referenced, and there's even an optimization for small ints where this can be observed in CPython (the standard Python implementation)
I wouldn't say Python has primitives. Even ints are referenced, and there's even an optimization for small ints where this can be observed in CPython (the standard Python implementation)
Output:>>> 2**2 is 2**2
True
>>> 2**32 is 2**32
False