PEP 234: Iterators

Roman Suzi rnd at onego.ru
Wed May 2 12:12:17 EDT 2001


On Wed, 2 May 2001, Bjorn Pettersen wrote:

>Perhaps it's only a matter of naming? How about itemIterator(),
>valueIterator(), etc (or itemiter() if you don't like camelcase)

What if...


for v in dict.iter("value"):

for i in list.iter()

for i in someobject.iter("somevalue")

for line in file.iter("line")

for block in file.iter("block", 12)

...

?


This user the same keyword for all methods and
allows for more flexibility, default
arguments, etc.

>
>-- bjorn
>
>

Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Wednesday, May 02, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "Cats have nine lives - but sleep through eight of them." _/





More information about the Python-list mailing list