[EMAIL PROTECTED] wrote: > Hi, > > I'm trying to write a method that needs to know both the class name and > the instance details > > Any suggestions? >
What's the point of using a classmethod and an explicit cls argument when you can get the class object from the instance itself? >>> class Test(object): def meth(self): print self print self.__class__ print type(self) >>> test = Test() >>> test.meth() <__main__.Test object at 0x00FA1710> <class '__main__.Test'> <class '__main__.Test'> >>> -- http://mail.python.org/mailman/listinfo/python-list