Making immutable instances

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Nov 23 17:50:07 EST 2005


Howdy all,

How can a (user-defined) class ensure that its instances are
immutable, like an int or a tuple, without inheriting from those
types?

What caveats should be observed in making immutable instances?

-- 
 \         "Love is the triumph of imagination over intelligence."  -- |
  `\                                                  Henry L. Mencken |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list