Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Iterators vs Enums  RSS feed

 
Bill Prentice
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anybody have any real reasons to prefer Iterators over Enumerations? For instance, are they quicker or less expensive to execute. I know about the advantage of the remove method and wondered if there was any other good reason to make the change.
Thanks in advance
Bill
 
Ashwin Desai
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The remove() method is the only additional feature that an iterator offers over an Enumeration. ALso, the method names are smaller and thus easier to remember and to use.
Ashwin.
[This message has been edited by Ashwin Desai (edited May 03, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!