On Mon, Oct 8, 2018 at 9:20 AM Lukasz Szybalski <[email protected]> wrote:
> Is there a way to force this object to be "read only" or now allow 
> modification, to prevent somebody else in some other sections of the code 
> accidently modifies request.registry.mycontract?

def __setattr__(self, attr, value):
    if self.__locked:
        raise AttributeError("read-only (locked) object")

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/CAH9f%3DurS9B_huwNP0aRefUQY9Z4icKc0ixRNny918LCTE7LTJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to