Re: Method chaining on decorator got SyntaxError

2011-02-17 Thread Duncan Booth
alex23 wrote: > Makoto Kuwata 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('$(

Re: Method chaining on decorator got SyntaxError

2011-02-16 Thread alex23
Makoto Kuwata 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 file_html

Re: Method chaining on decorator got SyntaxError

2011-02-16 Thread Makoto Kuwata
On Thu, Feb 17, 2011 at 11:40 AM, MRAB wrote: > On 17/02/2011 01:55, Makoto Kuwata wrote: >> >> Thank you MRAB, >> >> On Thu, Feb 17, 2011 at 8:49 AM, MRAB  wrote: >>> >>> You may want to read the discussion at: >>> >>> >>> https://groups.google.com/group/python-ideas/browse_thread/thread/1eebf486

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, MRAB 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 t

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 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

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

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):