Status of PEP's?

Greg Ewing greg at cosc.canterbury.ac.nz
Tue Mar 5 19:32:54 EST 2002


James_Althoff at i2.com wrote:
> 
> I don't have to think that a dict object *is* a sequence to be content with
> it being a valid arg to iter().

Well, more generally, "collection". And I *do* think
of a dict as being a collection -- of key-value pairs.
It's perhaps debatable whether its iterator should
return just the keys or keys+values, but the decision
made here makes perfectly good sense to me. In real
life, it doesn't seem at all odd to ask things like
"Is 'furgleblunger' in the dictionary?"

But if someone asked me "Is 7 in 42?" I'd think
I'd misheard them somehow.

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list