jython and ZipFile and Enumeration - what's happening here?


[scohen@sleepingbear scohen]$ jython
Jython 2.1 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> from java.util.zip import ZipFile, ZipEntry
>>> zf = ZipFile("jython.jar")
>>> entries = zf.entries()
>>> entries
java.util.zip.ZipFile$2@2a3e5b
>>> entries.hasMoreElements()
1
>>> entries.nextElement()
META-INF/
>>> entries.nextElement()
META-INF/MANIFEST.MF
>>> entries.nextElement()
com/
>>> entries.nextElement()
com/ziclix/
>>> entries.hasMoreElements()
1
>>> if entries.hasMoreElements():
...   print "hello"
...
Traceback (innermost last):
  (no code object) at line 0
  File "<console>", line 3
        null
        ^
SyntaxError: invalid syntax
>>>
entries.hasMoreElements() returns 1 but if I use it in an expression I get this error.  What's going on here?