Author tungwaiyip
Recipients
Date 2004-12-02.19:17:14
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=561546

You didn't get the problem case. The microsecond is wanted 
but it happens to be 0. Now I can't get a timestamp aligned 
without some doing some extra checking.

I also hate complicating signatures. So my recommendation 
really is to remove the one line of if statement and have it 
always output the microsecond as a fixed size string. Python 
will have one less test case. The user will get a fix sized string 
they can easily slice to get any precision they want.

The current logic really only complicate things. If you take it 
one step further and skip minute and second if they are all 0, 
it will probably be more of an annoyonce than useful. Nor is 
the trimming trailing zeros rationale is actually taking place 
here. On Windows str(now()) always have the last 3 digits 0, 
except in the 1/1000 of time when the microsecond happens 
to be 0.

Nothing is fatal flawed here. Right now I just avoid str() and 
use the strptime() instead. The problem is just the extra logic 
in str() actually make it less useful.
History
Date User Action Args
2007-08-23 16:08:34adminlinkissue1074462 messages
2007-08-23 16:08:34admincreate