Anders Kaseorg <ande...@mit.edu> added the comment:

Antoine: That’s true.

Amaury: See my original bug description (“This is reasonable advice for writing 
an iterator class, but terrible advice for writing a container class…”), and my 
other comments.

There is nothing wrong with explaining how to write an iterator, but the 
explanation needs to make clear that this is _not_ how you write a container.  
Currently the section opens with a misleading motivation (“By now you have 
probably noticed that most container objects can be looped over using a for 
statement”), but it does actually not explain how to write a container at all.  
So I proposed some language and an example to fix that.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8376>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to