[Tutor] Converting integers into digit sum (Python 3.3.0)

spir denis.spir at gmail.com
Tue Dec 10 13:37:03 CET 2013


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


More information about the Tutor mailing list