Author crotwell
Recipients crotwell
Date 2008-02-29.20:12:23
SpamBayes Score 0.011961705
Marked as misclassified No
Message-id <>
If there is a method of the same name as both static and on the object,
the static one can't be called. For example Class.getName() works on URL
because there is no getName() object method, but toString() does not
because there is both a object toString() in URL and a toString() on the
Class object:

crotwell$ java -jar output/lib/jython-2.2.1.jar 
Jython 2.2.1 on java1.5.0_13
Type "copyright", "credits" or "license" for more information.
>>> from import URL 
>>> URL.getName()
>>> URL.toString()
Traceback (innermost last):
  File "<console>", line 1, in ?
TypeError: toString(): expected 1 args; got 0

Interestingly, the str() function seems to find the toString on the class:

>>> str(URL)
Date User Action Args
2008-02-29 20:12:24crotwellsetspambayes_score: 0.0119617 -> 0.011961705
recipients: + crotwell
2008-02-29 20:12:24crotwellsetspambayes_score: 0.0119617 -> 0.0119617
messageid: <>
2008-02-29 20:12:24crotwelllinkissue1002 messages
2008-02-29 20:12:23crotwellcreate