Actions
Bug #6538
closedMutability of Rational and Complex
Description
I hesitated to report this, but there is a "hole" in the immutability of Rational & Complex:
r = Rational(0) # Rationals are immutable
r.freeze # but let's be certain and freeze it!
magic_trick(r) # r is now changed:
r # => (1/42)
The same thing occurs with Complex. I've left out the definition of magic_trick
for anyone who wants to try and figure it out, but it's here: http://pastie.org/4016117
Is this worth fixing?
Files
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0