On 12/10/2013 11:56 AM, Steven D'Aprano wrote:
This is because the function does *two things*, when it should do one.
First it calculates the digit sum, and then it prints it.

print's inside functions are a sign of debug not completely cleaned ;-)

(and also a sign that test funcs do not provide enough information, or not the right kind; but this is not always possible, I guess)

Denis
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to