[Python-Dev] Re: Decorators with arguments are curries!
Andrew Durdin
adurdin at gmail.com
Sat Aug 7 14:59:02 CEST 2004
On Sat, 7 Aug 2004 22:36:59 +1000, Andrew Durdin <adurdin at gmail.com> wrote:
> # using curry as proposed in PEP 309 [**]
> @foo_decorator
> @curry(bar_decorator, "one param here")
And that really should have been:
# using rightcurry as mentioned in PEP 309 [**]
@foo_decorator
@rightcurry(bar_decorator, "one param here")
But that's not a primary issue.
The primary issues were: (1) That decorators with vs. without
arguments look inconsistent, like function calls vs. function
references, and (2) that consequentially, decorator syntax is
implicitly introducing a non-viable currying syntax.
More information about the Python-Dev
mailing list