New submission from Stephen Paul Chappell:
The following interactive session shows that iterables are not detected
properly by the `collections.abc.Iterable` class.
>>> class IsIterable:
def __init__(self, data):
self.data = data
def __getitem__(self, key):
return self.data[key]
>>> is_iterable = IsIterable(range(5))
>>> for value in is_iterable:
value
0
1
2
3
4
>>> from collections.abc import Iterable
>>> isinstance(is_iterable, Iterable)
False
----------
components: Library (Lib)
messages: 193723
nosy: Zero
priority: normal
severity: normal
status: open
title: Iterables not detected correctly
type: behavior
versions: Python 3.3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18558>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com