Message191

Author bckfnn
Recipients
Date 2000-11-18.19:44:29
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
For some reason, if a Java class defines a method 'public String getName()',
then
it breaks the getName() method on its class object.  For example, the following
program:

import java.awt.Button

b = java.awt.Button('hi')
c = b.getClass()
print c
print c.getName()

Fails with the output:

java.awt.Button
Traceback (innermost last):
  File "/tmp/bug.py", line 6, in ?
TypeError: getName(): expected 1 args; got 0

Other methods of the class object work (e.g., getDeclaredConstructors()), and
b.getName() works.

I have no idea of a cause or solution (although in my case it's easy to work
around
since "'%s' % c" gives me the name of the class).

History
Date User Action Args
2008-02-20 17:16:44adminlinkissue222871 messages
2008-02-20 17:16:44admincreate