"I think you should try to get into the habit if writing docstring comments, defining what exactly the method expects (precondition) and what it returns/does (postcondition).
In this case for example, it should say what convention (inclusive/exclusive it follows) and what happens in boundary cases (like entire input is one run or so, if that is different).
If you do that diligently, you can use the method much more confidently."
"I think you should try to get into the habit if writing docstring comments, defining what exactly the method expects (precondition) and what it returns/does (postcondition).
In this case for example, it should say what convention (inclusive/exclusive it follows) and what happens in boundary cases (like entire input is one run or so, if that is different).
If you do that diligently, you can use the method much more confidently."
-seb