I can't comment on the algorithm, but the code you're replacing should be removed rather than being commented out.  And the old code should certainly not be included in the function's docstring, since that would make the old code appear in the generated documentation, which would be both confusing and misleading.