The helper function is not callable from the module (making it hard to get at the docstring), but I agree with you that some description of what's going on is appropriate. If you'd like I could move the helper function to the main module (eh...) or use comments instead of a docstring.

I did add a docstring that describes the arguments and their purpose. I didn't go into much detail about the algorithm - I made a few attempts to summarize it, but it felt like just writing the function out again.

I did replace the "fill" parameters for the initial permutation with `None` instead of `0`; this makes it a little more clear for the (code) reader that those aren't array indexes.

Anything else you'd like to see?