1. well, I'd attribute that to ruby wich had
    for i in Enumerable #file, socket, dir,collections..
    ...
    end

    since the beginning :)

    (even though I strongly prefer python's coroutinish iterators to ruby's internal ones)
      posted by verbat at 12:05:04 PM on November 10, 2004  
  2. Python had it since the beginning too... __iter__ is fairly new, but there were other ways to do the same thing (__getitem__, for example).
      posted by Hans Nowak at 12:46:20 PM on November 10, 2004