
Jan. 21, 2022
6:48 a.m.
On 20/01/22 3:17 am, Joao S. O. Bueno wrote:
But upon seeing a method call, we can just think first of a runtime behavior Correctly, btw. Any optimization there would be an exception, that people would have to know by heart.
Frozensets are immutable, so nobody should be making any assumptions about whether equal frozensets are the same object or not -- just as with ints, strings, etc. It would be just as legitimate e.g. for "ABC".upper() to return the same string object. There is no exception here to be learned. -- Greg