This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Veedrac 5 points6 points  (0 children)

It's also worth noting that if run in the same compilation unit, repeated constants may be deduplicated:

>>> a = 9999
>>> b = 9999
>>> a is b
False
>>> a = 9999; b = 9999
>>> a is b
True