Barry Warsaw wrote: > OTOH, making iterators callable as equivalent to .next() as I think > Raymond suggested sounds about perfect. You get __next__(), plus > explicit iteration with no additional built in necessary.
But that would raise the question of why __next__ wasn't called __call__ instead. Also I'm not sure I like this idea. It smells like an abuse of the notion of calling to me. One doesn't normally expect that calling a callable object has a side effect on the callable itself. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com