Thanks for the very fast feedback :) I specifically set optionalline = None to deal with that bug you mentioned, with the implicit assumption createRecord knows how to deal with a None argument. If that guard got destroyed in the copy paste process, my bad.
As for you solution, yes, you could do it that way. But I'm not so much interested in alternate solutions to the problem itself, which is to be honest trivial. I'm intereseted in the implications of the imaginary solution of the Acceptor function. Just as you can have Iterators (an abstract class based solution to iteration) without Generators, yet Generators are still of interest, so you could solve this problem without Acceptors, yet Acceptors are (potentially) of interest. Basically, an Acceptor is linked to a Generator (or some other sequence) in the way you have linked the class implementation to a Generator. So this is a kind of implementation of an Acceptor using a class. I like the Acceptor syntax, though. And I'm wondering if maybe there are more complex examples that are harder or impossible to do your way... I think I already put something (briefer) in the Q&A bit along these lines.... -- http://mail.python.org/mailman/listinfo/python-list