Re: Get the class name

2009-06-08 Thread Jeff McNeil
On Jun 8, 11:33 am, Gary Herron wrote: > Kless wrote: > > Is there any way of to get the class name to avoid to have that write > > it? > > > --- > > class Foo: > >    super(Foo, self) > > --- > > > * Using Py 2.6.2 > > The question does not make sense: >     "to have WHAT

Re: Get the class name

2009-06-08 Thread Gary Herron
Kless wrote: Is there any way of to get the class name to avoid to have that write it? --- class Foo: super(Foo, self) --- * Using Py 2.6.2 The question does not make sense: "to have WHAT write WHAT", and the code is wrong: the call to super fails But even

Re: Get the class name

2009-06-07 Thread Carl Banks
On Jun 7, 1:14 pm, Kless wrote: > Is there any way of to get the class name to avoid to have that write > it? > > --- > class Foo: >    super(Foo, self) > --- > > * Using Py 2.6.2 If you are using emacs you can use the put the following elisp code in your .emacs file, defi

Re: Get the class name

2009-06-07 Thread Robert Kern
On 2009-06-07 15:41, Tuomas Vesterinen wrote: Kless wrote: Is there any way of to get the class name to avoid to have that write it? --- class Foo: super(Foo, self) --- * Using Py 2.6.2 >>> class Foo(object): ... def cls(self): ... return self.__class__ ... >>> Foo

Re: Get the class name

2009-06-07 Thread Tuomas Vesterinen
Kless wrote: Is there any way of to get the class name to avoid to have that write it? --- class Foo: super(Foo, self) --- * Using Py 2.6.2 >>> class Foo(object): ... def cls(self): ... return self.__class__ ... >>> Foo().cls() -- http://mail.python.or