AllenDowney / ThinkPython2

LaTeX source and supporting code for Think Python, 2nd edition, by Allen Downey.
Other
2.49k stars 1.65k forks source link

section 16.2: built-in function name used as local variable name #98

Open jgmbenoit opened 2 years ago

jgmbenoit commented 2 years ago

In section 16.2, the function add_time has sum as local variable. But sum is a built-in function. This may work but it might be considered as a bad habit to use built-in function names as variable names. I guess that sum can be replaced, in this particular context, by totaltime (or simply total).