From: Lars H. <he...@se...> - 2007-05-09 12:15:30
|
Hi there, In one method I have to receive a Java class (an interface) and return a concrete implementation for it. Now, I have the problem, that the following does not work: >>> def class_name(cls): return cls.getName() >>> from somepackge import SomeInterface >>> class_name(SomeInterface.class) Traceback (innermost last): File "<console>", line 1, in ? File "<console>", line 2, in class_name TypeError: getName(): expected 1 args; got 0 Is it possible to get the class name? How? Class.getName(SomeInterface.class) does not work either. Thanks and best regards, Lars -- http://www.semagia.com |