[Python-ideas] An easier syntax for writing decorators(&similar things)?
castironpi at comcast.net
Thu Jan 24 21:36:53 CET 2008
> > > > +1 on prepartial in functools.
> > >
> > > So far, I've only seen this one use case for prepartial - and I'd
> > > rather have decorator_withargs itself than prepartial. Do you have
> > > any other use cases for prepartial (from real code somewhere)?
> > >
> > > Currently, I'm -1 on adding prepartial to functools, and +0.5 on
> > > adding something like decorator_withargs.
> > Are you also -1 on partial's being in functools?
> Not that it matters, since it's already there, but no, I wasn't.
Good. I was. It got in.
> fact, the presence of partial is a big reason not to need prepartial
> -- most existing use cases are already covered by using partial.
> Arnaud pointed out, if you restrict decorator_withargs to keyword
> Thus, I don't see prepartial as really covering many new use
A -> B
Thus what again?
> If you'd like to convince me otherwise, you're going to need
> to post some use cases from real code.
curry= partial( partial, prepartial ) 
More information about the Python-ideas