From: Phrogz Date: 2007-08-09T12:39:56+09:00 Subject: Re: python-style decorators On Aug 6, 10:23 am, Trans wrote: > I'm not sure how I feel about the use of declarative style. I'm not a > big fan of public, private, protected to begin with b/c of ... > Though it's a bit less convenient, it might be better to just name the > method: > > class C > def tak(x, y, z) > return z if x <= y > tak(tak(x - 1, y, z), tak(y - 1, z, x), tak(z - 1, x, y)) > end > memoized :tak > end Very much for reasons like this do I keepcauggesting that def be a statement that returns the defined method instance. Then you could do: class C memoized def tak( x, y, z ) #... end end Further (not that I know python) I imagine this would enable the "stacking" that the OP wanted: class C memoized awesomificated def tak( ... ) #... end end ...as long as the decorating methods in play kept on returning the method being affected.