geoffl/miro — comment on commit cc1e63d579eb06d12a77279ce0634e96dc76f3be
File:  line 0
By bendk:

I like this approach, but I think it's weird that now find_new_children() and _make_new_children() can only be called inside an idle iterator. I'd rather do one of the following:

- We refactor so that those functions work as iterators that are used by split_item(). Maybe we change find_new_children() to an iterator that yields paths, and we change _make_new_children() to _make_new_child(). Then split_item() would iterate through the output of find_new_children(), pass it to _make_new_child() and yield. I think this way only split_item() would need the slightly strange empty yield calls.

- We move find_new_children() and _make_new_children() to a utility class with a clear docstring that it should be used inside an idle_iterator method.

- We add docstrings to find_new_children() and _make_new_children() that explain when they should be called.