I'm attempting to build a system that emulates a Jython List, but written in Java. I've got basically all of the systems for it in place, but I've gotten stuck when I try to use the builtin max() function on the object.
When I do the following:
arr = Array.getNew(range(100)) # generates a list from 0 - 99
I get the following exception thrown: java.util.NoSuchElementException
I'm guessing I haven't implemented some method in my emulated class.
From what I can tell, max() relies on Jython Iterators. I have the __iter__() method implemented, which produces a class that has all of the Iterator<E> methods implemented, plus a __nextiter__() method I found that the PyIterator class uses.
My Array's elements implement all of the "rich comparitor" methods for Jython to see: __eq__(), etc.
I'm lost as to what's missing here.
Currently using Jython 2.5.1RC1, I'll try RC2 here and see if I can resolve it with that (maybe it is a bug that's fixed, I dunno).
Any insight as to what is necessary to make the max() function work would be most appreciated.
"I'm not responcabel fer my computer's spleling errnors" - Xlorep DarkHelm
Sent from Santa Maria, California, United States