not your changes, but the print () usage is kind of odd (and inconsistent within this module). 

I'll clean it up in a separate patch