Re: [IronPython] mapping C# iterators to Python iterator

2007-12-03 Thread Dino Viehland
r/ItemEnumerable/ItemEnumerator classes. > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of amit > Sent: Saturday, December 01, 2007 4:15 PM > To: users@lists.ironpython.com > Subject: [IronPython] mapping C# iterators to Python iterat

Re: [IronPython] mapping C# iterators to Python iterator

2007-12-03 Thread amit
>> enumeration interfaces. When we pass your object out it'll be >> wrapped in one of our >> PythonEnumerable/PythonEnumerator/ItemEnumerable/ItemEnumerator classes. >> >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAI

Re: [IronPython] mapping C# iterators to Python iterator

2007-12-03 Thread amit
Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of amit > Sent: Saturday, December 01, 2007 4:15 PM > To: users@lists.ironpython.com > Subject: [IronPython] mapping C# iterators to Python iterator > > Hi, > > I want to know how the

Re: [IronPython] mapping C# iterators to Python iterator

2007-12-03 Thread Dino Viehland
t Sent: Saturday, December 01, 2007 4:15 PM To: users@lists.ironpython.com Subject: [IronPython] mapping C# iterators to Python iterator 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):

[IronPython] mapping C# iterators to Python iterator

2007-12-01 Thread amit
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.i