[Python-ideas] An easier syntax for writing decorators(&similar things)?
Aaron Brady
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.
> In
> fact, the presence of partial is a big reason not to need prepartial
Fallacy.
> -- most existing use cases are already covered by using partial.
Lacks citation.
> As
> Arnaud pointed out, if you restrict decorator_withargs to keyword
> arguments,
You don't.
> Thus, I don't see prepartial as really covering many new use
> cases.
Syllogism:
A -> B
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 ) [1]
[1] http://www.smlnj.org/
More information about the Python-ideas
mailing list