From: Alan L. <al...@li...> - 2001-07-18 17:36:06
|
I apologize ahead of time if this is an RTFM thing (or I'm just dumb) but .... I'm given some Java classes (sadly not in source) . Lets say I have class J and I subclass it in Jython: class P(J): ........... amongst the Java is a class that has getter and setter classes of type J: public class J2 { .. public J getJ() { } public void setJ(J j) { } } Now, of course, in Java I can setJ(p) and cast: (P)getJ() to get a P back. In Jython however I always get a J back from getJ() and I would seem to have no way of 'casting' it up to my Python subclass. Am I missing something purely obvious here ?? Thanks for JYthon -- as a long-time Python fan I am in hog heaven with this stuff .. Alan |