Issue428414
Created on 2001-05-29.19:38:42 by anonymous, last changed 2001-06-15.13:50:39 by pedronis.
History | |||
---|---|---|---|
Date | User | Action | Args |
2001-05-29 19:38:42 | anonymous | create |
Created on 2001-05-29.19:38:42 by anonymous, last changed 2001-06-15.13:50:39 by pedronis.
Messages | |||
---|---|---|---|
msg313 (view) | Author: Nobody/Anonymous (nobody) | Date: 2001-05-29.19:38:42 | |
I had the following pattern in my code: from javax.swing.tree import * from a import * # java package containing A class B (A, TreeModelListener): def __init__(self): A.__init__(self) ... ... # including methods implementing TreeModelListener this would cause an 'invalid self parameter' exception to be thrown at the A.__init__ call for the jythonc compiled code, but ran under the interpreter. Creating a separate class for the listener that just wrapped the B instance solved the problem. I know that inheriting from multiple Java classes is disallowed but I think class and interfaces should be OK since it is supported in Java. BTW. the jython FAQ is now empty thanks Daniel Mahler |
|||
msg314 (view) | Author: Samuele Pedroni (pedronis) | Date: 2001-06-15.13:50:39 | |
Logged In: YES user_id=61408 A python class can subclass many Java interfaces, even in jythonc, that's not the problem. I have tried the supposed failing code, it works of me. The point is about jythonc detecting A to be a Java class and producing the right 'extends' in the java code: this depends on the actual settings at jythonc invokation and yes the support for from _ import * is maybe fragile. I close the bug. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2001-05-29 19:38:42 | anonymous | create |
Supported by Python Software Foundation,
Powered by Roundup