[issue25737] array is not a Sequence

2021-02-17 Thread Irit Katriel
Irit Katriel added the comment: This works now: >>> from array import array >>> from collections.abc import Sequence >>> isinstance(array('I', [1]), Sequence) True It was fixed under issue29727. -- nosy: +iritkatriel resolution: -> duplicate status: open -> closed superseder: ->

[issue25737] array is not a Sequence

2019-02-27 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: +ceronman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25737] array is not a Sequence

2019-02-14 Thread Eryk Sun
Eryk Sun added the comment: I had closed this issue because I thought issue 23864 would be resolved by extending the existing behavior. Three years later, still with no resolution, Guido commented on that issue that the current behavior shouldn't be extended and only the documentation

[issue25737] array is not a Sequence

2019-02-14 Thread Josh Rosenberg
Josh Rosenberg added the comment: Correction: It should actually be registered as a subclass of MutableSequence (which should make it a virtual subclass of Sequence too; list is only registered on MutableSequence as well). -- ___ Python tracker

[issue25737] array is not a Sequence

2019-02-14 Thread Josh Rosenberg
Change by Josh Rosenberg : -- versions: +Python 3.7, Python 3.8 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25737] array is not a Sequence

2019-02-14 Thread Josh Rosenberg
Josh Rosenberg added the comment: This should not be closed as a duplicate. Yes, array.array isn't automatically a Sequence, but since it isn't, the array module should be modified to explicitly do the equivalent of: import _collections_abc _collections_abc.Sequence.register(array) so

[issue25737] array is not a Sequence

2015-11-26 Thread berdario
New submission from berdario: >>> from array import array >>> from collections.abc import Sequence >>> isinstance(array('I', [1]), Sequence) False -- components: Interpreter Core messages: 255413 nosy: berdario priority: normal severity: normal status: open title: array is not a

[issue25737] array is not a Sequence

2015-11-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, rhettinger, stutzbach type: -> behavior ___ Python tracker ___

[issue25737] array is not a Sequence

2015-11-26 Thread berdario
berdario added the comment: Ok, basically `Sequence` does not implement `__subclasshook__` and is manually hardcoded to ``` Sequence.register(tuple) Sequence.register(str) Sequence.register(range) Sequence.register(memoryview) ``` This is not by design, is it? --

[issue25737] array is not a Sequence

2015-11-26 Thread Eryk Sun
Eryk Sun added the comment: This is a duplicate of issue 23864, i.e. only the "one-trick ponies" work: >>> issubclass(array.array, abc.Sized) True >>> issubclass(array.array, abc.Iterable) True >>> issubclass(array.array, abc.Container) True -- nosy: +eryksun