I came across this self-answer today:
It had no explanation or evaluation of the code in question, just a code rewrite. This seems to me to not really achieve the purpose of this SE site in the first place, however it has been upvoted 3 times. Are these answers acceptable?
... Just realised the original question is 2 years old. My question still stands, though.