Message679
If multiple for loops are used on a java.util.Collection that
is not also a java.util.List the second loop will cause a
value error.
###############
from java.util import HashSet
hs = HashSet()
hs.add(1)
for x in hs:
print x
for y in hs:
print y
###############
the error is:
1
Traceback (innermost last):
File "test/com/cnnxn/audit/jython/BinForEach.py", line
10, in ?
ValueError: iterator indices must be consecutive ints
starting at 0
my email: gyork@cnnxn.com
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:06 | admin | link | issue575110 messages |
2008-02-20 17:17:06 | admin | create | |
|