← Back to team overview

maas-devel team mailing list archive

Re: idempotent()

 

On Tuesday 18 Feb 2014 16:35:06 Jeroen Vermeulen wrote:
> On 18/02/14 16:25, Julian Edwards wrote:
> > On Tuesday 18 Feb 2014 08:49:17 Gavin Panella wrote:
> >> Even though I was the one who dreamt it up, I have no special love for
> >> the idempotent() decorator, and it's always felt imperfect. Can we
> >> come up with a compelling improvement that better conveys semantics
> >> over mechanics?
> > 
> > If it's all in the name, what about "mutates".  So:
> > 
> > @operation(mutates=False)
> > def foo(....)
> 
> Can't we just state the HTTP method to be used — GET or POST?  AFAIK
> that's what we mean here anyway.  If appropriate, I'd happily update the
> special create/update/delete methods to have the same decorators, with
> their various arguments.

Yes, I would prefer that I think.  Didn't it do that at the beginning before 
the idempotent thing came along?

Not sure we need the CRUD methods doing though do we?  They're implicit.


Follow ups

References