[Python-Dev] Re: Sets: elt in dict, lst.include - really begs for a PEP

Greg Ewing greg@cosc.canterbury.ac.nz
Thu, 01 Feb 2001 12:21:04 +1300 (NZDT)

barry@digicool.com (Barry A. Warsaw):

>    for key in dict.iterator(KEYS)
>    for value in dict.iterator(VALUES)
>    for key, value in dict.iterator(ITEMS)

Yuck. I don't like any of this "for x in y.iterator_something()"
stuff. The things you're after aren't "in" the iterator, they're
"in" the dict. I don't want to know that there are iterators

We seem to be coming up with more and more convoluted ways
to say things that should be very straightforward.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+