Method chaining on decorator got SyntaxError

Makoto Kuwata kwa at kuwata-lab.com
Wed Feb 16 21:57:42 EST 2011


On Thu, Feb 17, 2011 at 11:40 AM, MRAB <python at mrabarnett.plus.com> wrote:
> On 17/02/2011 01:55, Makoto Kuwata wrote:
>>
>> Thank you MRAB,
>>
>> On Thu, Feb 17, 2011 at 8:49 AM, MRAB<python at mrabarnett.plus.com>  wrote:
>>>
>>> You may want to read the discussion at:
>>>
>>>
>>> https://groups.google.com/group/python-ideas/browse_thread/thread/1eebf486969c39a1/?hl=en
>>> --
>>
>> I can't figure out what is the point or conclusion of that discussion.
>> Is there any technical reason? Or Ideological reason?
>>
> Ideological.
>
> Keep it simple.
>
> "Readability, not succinctness, is what's Pythonic." -- Mike Meyer

Thank you, MRAB.
I'm sad about this restriction because:

    @recipe.product('*.html').ingreds('$(1).rst')
    def file_html(c):
        # do something

is enough simple and more readable than:

    @recipe.product('*.html')
    @recipe.ingreds('$(1).rst')
    def file_html(c):
        # do something

But I'll follow the Python's philosophy.

--
regards,
makoto kuwata



More information about the Python-list mailing list