Hi,
I want to know how the "Iterators" in C# can be mapped to those in Python.
What I tried was:
say for ArrayList object
def __iter__(self):
self.index = self.Count
return self
def next(self):
if self.index == 0:
raise StopIteration
self.index = self.index - 1
return ??
If I am creating python classes dynamically how would I map
GetEnumerator() , MoveNext() , Current() , Reset()
to python Class so as to make it iterable inside python.
--Regmee
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com