471,337 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Jython import coventions

When importing Java packages in Jython, what is the convention to
simplify imports? For example:
import java.util as util
Is this correct? Or should I use from * import *?

Oct 10 '07 #1
1 1072
On Oct 9, 10:42 pm, Benjamin <musiccomposit...@gmail.comwrote:
When importing Java packages in Jython, what is the convention to
simplify imports? For example:
import java.util as util
Is this correct? Or should I use from * import *?
I have preferred the style...

import java
import javax

....and then using complete references to java classes, in your case,
java.util.whatever. It clearly shows me where I'm using Python classes
vs. java classes when I read my own code. For this situation, more
path structure seems less confusing to me.

Oct 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by angel | last post: by
7 posts views Thread by Jan Gregor | last post: by
1 post views Thread by Nandan | last post: by
12 posts views Thread by Mark Fink | last post: by
1 post views Thread by Mark Fink | last post: by
1 post views Thread by Gregor Stich | last post: by
1 post views Thread by nmin | last post: by
2 posts views Thread by Felipe De Bene | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.