[docs] [issue10410] Is iterable a container type?

INADA Naoki report at bugs.python.org
Sun Nov 14 11:25:24 CET 2010


INADA Naoki <songofacandy at gmail.com> added the comment:

>> Likewise, "and objects of any classes you define
>> with an __iter__() or __getitem__() method." is
>> wrong because __getitem__ method is not relate to
>> iterable
>
> That wording is correct.  Sequences are automatically
> iterable even if they don't define __iter__.  For example:

Wow, thank you!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10410>
_______________________________________


More information about the docs mailing list