def __setattr__(self, name, value):
        """
        Step 3 (2nd flow). Set some attribute
        """
        # set
        super(InvariantedClass, self).__setattr__(name, value)
        if name == '_disable_patching':
            return
        # validation only after set
        self._validate()
def __setattr__ ( self , name , value ) : super ( InvariantedClass , self ) . __setattr__ ( name , value ) if name == '_disable_patching' : return self . _validate ( )
Step 3 (2nd flow). Set some attribute