def attrsetter(attr, value):
 return (lambda method: (setattr(method, attr, value) or method))

def attrsetter ( attr , value ) : return ( lambda method : ( setattr ( method , attr , value ) or method ) )
return a function that sets attr on its argument and returns it .