Rhodri James wrote: > On Fri, 03 Apr 2009 02:07:38 +0100, grocery_stocker <cdal...@gmail.com> > wrote: >> Would 'a' somehow call __iter__ and next()? If so, does python just >> perform this magically? > > No. It's "for" that invokes the iteration protocol; that's pretty > much the definition of it. You have read the iteration protocol > after it's been mentioned so many times now, haven't you?
argh. when i said "yes" i meant that something calls them - that they realy do exist behind the scenes. but rhodri is right (again), it's "for" that does the work. sorry. andrew -- http://mail.python.org/mailman/listinfo/python-list