Message3003

Author pedronis
Recipients
Date 2001-10-15.22:43:19
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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 
brinkman@math.uiuc.edu 
History
Date User Action Args
2008-02-20 17:18:58adminlinkissue471528 messages
2008-02-20 17:18:58admincreate