What's the proper style for a library string function?
C.D. Reimer
chris at cdreimer.com
Sat Jul 19 16:03:16 EDT 2014
On 7/19/2014 12:14 PM, Mark Lawrence wrote:
>
> Is this what you intended?
>
I'm in the process of generalizing a library module from my first Python
programming project to make it more accessible to other projects. The
code I wrote for that project doesn't make sense anymore. As I
generalize the library module, I'm also cleaning up the calling code
from that project and other scripts.
The corrected version of the string function should be:
def format_completed_time(start, end):
return "Time completed: " + str(end - start)
Chris Reimer
More information about the Python-list
mailing list