[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards
James Edwards added the comment: Edit conflict -- indeed -- self closing. --- I should point out that this could be fixed with something like the following: @classmethod def __subclasshook__(cls, C): if cls is Sequence: return _check_methods(C, "__reversed__", "__

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread Josh Rosenberg
Change by Josh Rosenberg : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread Josh Rosenberg
Josh Rosenberg added the comment: This is an exact duplicate of #35190 - "collections.abc.Sequence cannot be used to test whether a class provides a particular interface (doc issue)" -- nosy: +josh.r resolution: -> duplicate superseder: -> collections.abc.Sequence cannot be used to

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards
James Edwards added the comment: This was tagged as 3.7, but the issue still exists AFAICT in the latest github master: https://github.com/python/cpython/blob/master/Lib/_collections_abc.py -- ___ Python tracker

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards
New submission from James Edwards : Consider: from collections.abc import * class DefinitelyNotAList: def __init__(self, backer): self.backer = backer def __getitem__(self, key): return self.backer[key] def __len__(self): re