[Python-Dev] Making mutable objects readonly

Mark Hammond MarkH@ActiveState.com
Wed, 31 Jan 2001 23:18:12 +1100


MAL writes:

> > - How to spell it?  x.freeze()?  x.readonly()?
>
> How about .lock() and .unlock() ?

I'm with Greg here - lock() and unlock() imply an operation similar to
threading.Lock() - ie, exclusivity rather than immutability.

I don't have a strong opinion on the other names, but definately prefer any
of the others over lock() for this operation.

Mark.