messages/_utils.py
def validate_property(attr):
    """
    A property factory that will dispatch the to a specific validator function
    that will validate the user's input to ensure critical parameters are of a
    specific type.
    """

    def getter(instance):
        return instance.__dict__[attr]

    def setter(instance, value):
        validate_input(instance.__class__.__name__, attr, value)
        instance.__dict__[attr] = value

    return property(fget=getter, fset=setter)
def validate_property(attr):
    def getter(instance):
        return instance.__dict__[attr]

    def setter(instance, value):
        validate_input(instance.__class__.__name__, attr, value)
        instance.__dict__[attr] = value

    return property(fget=getter, fset=setter)
def validate_property ( attr ) : def getter ( instance ) : return instance . __dict__ [ attr ] def setter ( instance , value ) : validate_input ( instance . __class__ . __name__ , attr , value ) instance . __dict__ [ attr ] = value return property ( fget = getter , fset = setter )
A property factory that will dispatch the to a specific validator function
    that will validate the user's input to ensure critical parameters are of a
    specific type.
A property factory that will dispatch the to a specific validator function that will validate the user s input to ensure critical parameters are of a specific type .