[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r40229 - trunk/build

From: Branko Cibej <brane_at_xbc.nu>
Date: Tue, 27 Oct 2009 04:59:55 +0100

Blair Zajac wrote:
>
>> # Log the elapsed time.
>> - elapsed_time = time.strftime('%H:%M:%S',
>> - time.gmtime(time.time() - start_time))
>> + elapsed_time = str(datetime.now() - start_time)
>>
>
> You don't need to put the value in str() since you're going to pass it
> to the % operator below for a %s interpolation, which calls str() on
> it already.
>

No, he doesn't need to. But there shouldn't be any discernible
difference between calling str() here explicitly, and letting the
formatter do that later, implicitly. This way it's at least clear what's
going on. I do remember reading somewhere that "explicit is better than
implicit." :)

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411586
Received on 2009-10-27 05:00:20 CET

This is an archived mail posted to the Subversion Dev mailing list.