[issue22487] ABC register doesn't check abstract methods

2014-09-24 Thread R. David Murray
R. David Murray added the comment: Python is a consenting adults language. If you call register, we assume you know what you are doing. The isinstance check, on the other hand, does look in certain cases. So if you define __iter__ you don't have to call register to make isinstance(o, Iterab

[issue22487] ABC register doesn't check abstract methods

2014-09-24 Thread Ryan McCampbell
Ryan McCampbell added the comment: Obviously, I meant isinstance(o, Collections.Iterable). -- ___ Python tracker ___ ___ Python-bugs-l

[issue22487] ABC register doesn't check abstract methods

2014-09-24 Thread Ryan McCampbell
New submission from Ryan McCampbell: Is there a reason register() doesn't check for abstract methods, like subclassing does? Would it fail for some builtin classes? It seems that this would be a better guarantee that, say, something really is iterable when you check isinstance(Collections.Iter