On Thu, Aug 06, 2020 at 09:57:59AM +0200, Dominik Vilsmeier wrote:

> It seems that the OP has many such transformations and wants to use
> decorators to define a pipeline of transformations:
> 
>     @foo
>     @bar
>     @baz
>     something = initial_value
> 
> instead of
> 
>     something = foo(bar(baz(initial_value)))
> 
> which becomes unreadable for longer function names / more functions in
> general.

    something = \
        foo(
        bar(
        baz(
            initial_value
        )))

is possible right now, and the style is not that far off the 
suggested decorator syntax.

Decorator syntax is a great hammer, and functions and classes make good 
nails. Arbitrary function calls are not good nails, there is no 
need to use a hammer on them.



-- 
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/QQ6R4KVHWAY36PCUZAAPTLMIXFKDTQUL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to