Jython import coventions

OnCallSupport321 at gmail.com OnCallSupport321 at gmail.com
Wed Oct 10 15:38:25 CEST 2007

On Oct 9, 10:42 pm, Benjamin <musiccomposit... at gmail.com> wrote:
> 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.

More information about the Python-list mailing list