[New-bugs-announce] [issue10410] Is iterable a container type?

INADA Naoki report at bugs.python.org
Sat Nov 13 20:18:28 CET 2010

New submission from INADA Naoki <songofacandy at gmail.com>:

In http://docs.python.org/release/2.6.6/glossary.html, "iterable" is described as
"A container object capable of returning its members one at a time."
Is it correct? Is stream object like file a container type?

Container ABC requires only "__contains__" abstract method. I think file
is iterable but is not container.

Likewise, "and objects of any classes you define with an __iter__() or
__getitem__() method." is wrong because __getitem__ method is not relate to

assignee: docs at python
components: Documentation
messages: 121152
nosy: docs at python, naoki
priority: normal
severity: normal
status: open
title: Is iterable a container type?
versions: Python 2.6, Python 2.7, Python 3.2, Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list