From: <no...@so...> - 2001-08-11 03:10:09
|
Bugs item #449980, was opened at 2001-08-10 20:10 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=449980&group_id=12867 Category: Jythonc compiler Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Tracking variables across packages Initial Comment: Hi! I have got a jytohn package that derives a class from a java class that's given by the value of a variable of another package. In the situations I have in mind, the value of that variable would be known at compile time, so it would be possible for jythonc to create a proxy so the resulting code can work without the presence of compiler classes (ProxyMaker in particular). It appears that jythonc does this for variables of the same package, but doesn't seem to track variable assignments across packages. The following two examples illustrate this point. The following example works, even when compiled and packaged without compiler classes. ---------- example1.py--------------------- import java cl=java.lang.Object class spam(cl): pass ---------------------------------------------- The next example does _not_ work without compiler classes. ---------- example2.py ------------------- import java import init # any module, can be empty init.cl=java.lang.Object class spam(init.cl): pass ----------------------------------------- It appears that jythonc does not track classes across module boundaries,even though this kind of tracking shouldn't be too difficult in this case. Moreover, the two programs are essentially the same, so it seems reasonable to expect them to behave in the same way. I think it would be highly desirable to have jythonc create proxies whenever possible, in order to minimize the dependence of the resulting code on the presence of compiler classes. This should be possible whenever the value of such variables is known at compile time. Best, Peter bri...@ma... ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=449980&group_id=12867 |