Okay, I understand why you want the collector parameter to be changeable. We think about the command-query separation principle. Either a function is stateless, and returns an object, or it's an action which changes state, but it returns None. Anyway, in this case, I'd return an iterator, instead of modifying a kwarg.