The comment indicated that end could be None, and I've fleshed out the comment with more detail.
Attach a file by drag & drop or click to upload