From: Austin Ziegler Date: 2004-12-01T05:38:09+09:00 Subject: Re: [OFF] Python 2.4 released On Wed, 1 Dec 2004 04:52:47 +0900, itsme213 wrote: > > > (ruby does/has?)5 PEP 318: Decorators for Functions and Methods > > > > Ruby has this implicitly, because its object model is far more > > consistent. The only thing that may improve this is an RCR that > > makes it easier to deal with custom decorators by having def return > > the Symbol of the method name. Probably :) > A convenient decorator syntax would be very nice. Very. It's been asked for a lot. > Also, I believe Python manipulates the method as an object. I don't think > manipulating a symbol (without the context of the class in which that symbol > serves to name a method) can be equivalent. Maybe def should return > something like a > - Method (for def x.foo...) or > - UnboundMethod or [Symbol, Class] pair (for class X; def foo ... ) Well, the case of def x.foo is the only case where a Symbol by itself isn't going to be useful, really -- so maybe [Symbol, "Class"] is the better choice. Other manipulations of thse things in Ruby -- are done with the Symbol, and there's not a lot you can do to manipulate a Method object. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca