Re: Method chaining on decorator got SyntaxError

2011-02-17 Thread Duncan Booth
alex23 wuwe...@gmail.com wrote: Makoto Kuwata k...@kuwata-lab.com wrote: 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')    

Method chaining on decorator got SyntaxError

2011-02-16 Thread Makoto Kuwata
Hi, I have a question about decorator. I tried the following example and got Syntax Error. class deco(object): def __init__(self, name): self._name = name def foo(self, value): self._foo = value return self def __call__(self, func):

Re: Method chaining on decorator got SyntaxError

2011-02-16 Thread MRAB
On 16/02/2011 23:25, Makoto Kuwata wrote: Hi, I have a question about decorator. I tried the following example and got Syntax Error. class deco(object): def __init__(self, name): self._name = name def foo(self, value): self._foo = value

Re: Method chaining on decorator got SyntaxError

2011-02-16 Thread Makoto Kuwata
Thank you MRAB, On Thu, Feb 17, 2011 at 8:49 AM, MRAB pyt...@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.

Re: Method chaining on decorator got SyntaxError

2011-02-16 Thread MRAB
On 17/02/2011 01:55, Makoto Kuwata wrote: Thank you MRAB, On Thu, Feb 17, 2011 at 8:49 AM, MRABpyt...@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

Re: Method chaining on decorator got SyntaxError

2011-02-16 Thread Makoto Kuwata
On Thu, Feb 17, 2011 at 11:40 AM, MRAB pyt...@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, MRABpyt...@mrabarnett.plus.com  wrote: You may want to read the discussion at:

Re: Method chaining on decorator got SyntaxError

2011-02-16 Thread alex23
Makoto Kuwata k...@kuwata-lab.com wrote: 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