"Noam Raphael" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| The reasoning is simple: Iteration over an object usually gets all the
| data it contains. A dict can be seen as an unordered collection of
| tuples (key, value), indexed by key. So, iteration over a dict should
| yield those tuples.

Given that viewpoint, yes.  But a dict can also be seen as a set of objects 
that happen to have a value attached (like a graph with labelled nodes, 
which is still 'made up of' nodes rather than (node,label) pairs).  From 
this viewpoint, yielding the objects is sensible.

By itself, I think the decision was a toss-up.  But consistency with 'in', 
which is not a toss-up, tips the balance.

tjr



_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to