Re: collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-31 Thread Ethan Furman
On 03/31/2013 10:57 AM, Byron Ruth wrote: I submitted this as bug last night: http://bugs.python.org/issue17584 and was *honored* to be rejected by Raymond Hettinger. However, I would like feedback on whether my concern (this bug) is justified and clarity if not. Consider: ```python class A(o

Re: collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-31 Thread Byron Ruth
Thanks for responding Terry. I can assure you I did not initially realize both the `next` and the `__iter__` methods were implemented when I ran into my original problem. I saw a behavior and had to work backwards to realize why it was behaving the way it was (the comparison against Iterator).

Re: collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-31 Thread Terry Jan Reedy
On 3/31/2013 1:57 PM, Byron Ruth wrote: I submitted this as bug last night: http://bugs.python.org/issue17584 and was *honored* to be rejected by Raymond Hettinger. However, I would like feedback on whether my concern (this bug) is justified and clarity if not. Consider: ```python class A(obj

Re: collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-31 Thread Byron Ruth
Raymond's replied to my follow-up and made me realize that the `next` property could return a callable and it would be transparent to the caller. On Sunday, March 31, 2013 1:57:08 PM UTC-4, Byron Ruth wrote: > I submitted this as bug last night: http://bugs.python.org/issue17584 and was > *honor

collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-31 Thread Byron Ruth
I submitted this as bug last night: http://bugs.python.org/issue17584 and was *honored* to be rejected by Raymond Hettinger. However, I would like feedback on whether my concern (this bug) is justified and clarity if not. Consider: ```python class A(object): def __init__(self): self