Re: Anomaly in creating class methods

2005-11-03 Thread Alex Martelli
venk <[EMAIL PROTECTED]> wrote: > Cool, > i got it now... accessing thru attribute reference always > returns a bound or unbound method... so, D.f is an unbound method Right. Specifically, accessing through a (newstyle) class or instance always calls the __get__ method of a descriptor [

Re: Anomaly in creating class methods

2005-11-03 Thread venk
Cool, i got it now... accessing thru attribute reference always returns a bound or unbound method... so, D.f is an unbound method whereas i want the "function" of the unbound method... ok, this example and the nice explanations definitively thought me about function, bound method (for

Re: Anomaly in creating class methods

2005-11-03 Thread Alex Martelli
venk <[EMAIL PROTECTED]> wrote: > Hi, > given below is my interaction with the interpreter In one case, i > have created the class method using the "famous idiom"... and in the > other, i have tried to create it outside the class definition... why > isn't the latter working ? (of course, the

Re: Anomaly in creating class methods

2005-11-03 Thread Bengt Richter
On 3 Nov 2005 03:19:22 -0800, "venk" <[EMAIL PROTECTED]> wrote: >Hi, > given below is my interaction with the interpreter In one case, i >have created the class method using the "famous idiom"... and in the >other, i have tried to create it outside the class definition... why >isn't the latter

Anomaly in creating class methods

2005-11-03 Thread venk
Hi, given below is my interaction with the interpreter In one case, i have created the class method using the "famous idiom"... and in the other, i have tried to create it outside the class definition... why isn't the latter working ? (of course, the presence of decorators is a different issue