On Fri, Apr 30, 2010 at 4:31 PM, Jeff Hardy wrote:
> On Fri, Apr 30, 2010 at 4:19 PM, Dino Viehland wrote:
>> That's definitely a bug. We usually check for the interfaces first and
>> we have a code path that's assuming we have a user-defined object when
>> we're not an enumerable/enumerator but
Jeff wrote:
> On Fri, Apr 30, 2010 at 4:19 PM, Dino Viehland wrote:
> > That's definitely a bug. We usually check for the interfaces first and
> > we have a code path that's assuming we have a user-defined object when
> > we're not an enumerable/enumerator but we have __iter__. It's easy
> > en
On Fri, Apr 30, 2010 at 4:19 PM, Dino Viehland wrote:
> That's definitely a bug. We usually check for the interfaces first and
> we have a code path that's assuming we have a user-defined object when
> we're not an enumerable/enumerator but we have __iter__. It's easy
> enough to fix we're just
Jeff wrote:
> I'm trying to implement a Python iterator in C# without also
> implementing IEnumerator/IEnumerable (I'm also assuming it's even
> possible, of course). When trying to use the class in a for loop (`cu`
> is a Cursor instance):
>
> >>> for row in cu:
> print cu
>
> TypeErro
I'm trying to implement a Python iterator in C# without also
implementing IEnumerator/IEnumerable (I'm also assuming it's even
possible, of course). When trying to use the class in a for loop (`cu`
is a Cursor instance):
>>> for row in cu:
print cu
TypeError: Unable to cast object of ty