[issue1158] %f format for datetime objects

2008-03-28 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue1158] %f format for datetime objects

2008-03-15 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Checking this in. All tests pass. Have for quite awhile. rev 61402. -- assignee: -> skip.montanaro __ Tracker <[EMAIL PROTECTED]> _

[issue1158] %f format for datetime objects

2007-12-09 Thread Skip Montanaro
Changes by Skip Montanaro: Removed file: http://bugs.python.org/file8903/datetime-f.diff __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing

[issue1158] %f format for datetime objects

2007-12-09 Thread Skip Montanaro
Skip Montanaro added the comment: Stop me before I update it again! This update touches up datetime_strptime a bit. It's more uniform and a bit faster. Added file: http://bugs.python.org/file8907/datetime-f.diff __ Tracker <[EMAIL PROTECTED]>

[issue1158] %f format for datetime objects

2007-12-09 Thread Skip Montanaro
Changes by Skip Montanaro: Removed file: http://bugs.python.org/file8901/datetime-f.diff __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing

[issue1158] %f format for datetime objects

2007-12-09 Thread Skip Montanaro
Changes by Skip Montanaro: Removed file: http://bugs.python.org/file8439/dt-30.diff __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1158] %f format for datetime objects

2007-12-09 Thread Skip Montanaro
Skip Montanaro added the comment: Updated diff. Just a tweak to datetime.rst. Added file: http://bugs.python.org/file8903/datetime-f.diff __ Tracker <[EMAIL PROTECTED]> __Index: Doc/library/datet

[issue1158] %f format for datetime objects

2007-12-09 Thread Skip Montanaro
Skip Montanaro added the comment: Actually, I think I will avoid the 3.0 patch altogether and let these changes propagate from trunk to py3k by whoever works that magic. __ Tracker <[EMAIL PROTECTED]>

[issue1158] %f format for datetime objects

2007-12-09 Thread Skip Montanaro
Changes by Skip Montanaro: Removed file: http://bugs.python.org/file8438/dt-26.diff __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1158] %f format for datetime objects

2007-12-09 Thread Skip Montanaro
Skip Montanaro added the comment: Okay, here's my latest patch (datetime-f.diff). 2.6 only at this point. Added file: http://bugs.python.org/file8901/datetime-f.diff __ Tracker <[EMAIL PROTECTED]> __

[issue1158] %f format for datetime objects

2007-09-17 Thread Skip Montanaro
Skip Montanaro added the comment: Brett> In terms of strptime, I would just change _strptime.strptime() to Brett> _strptime._strptime() and have it return everything along with Brett> the microseconds measurement. Then have public functions that Brett> call that function and either s

[issue1158] %f format for datetime objects

2007-09-17 Thread Brett Cannon
Brett Cannon added the comment: In terms of strptime, I would just change _strptime.strptime() to _strptime._strptime() and have it return everything along with the microseconds measurement. Then have public functions that call that function and either strip off the microseconds or not. -Brett

[issue1158] %f format for datetime objects

2007-09-17 Thread Skip Montanaro
Skip Montanaro added the comment: Brett, Continuing the discussion of strptime... It returns a time.struct_time. Would it cause too much breakage (only do this in 3.0) to add a tm_usec field to the end of that object? It seems a lot of bits of code might still expect a length 9 tuple-ish thing

[issue1158] %f format for datetime objects

2007-09-16 Thread Skip Montanaro
Changes by Skip Montanaro: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/pyth

[issue1158] %f format for datetime objects

2007-09-16 Thread Skip Montanaro
Skip Montanaro added the comment: Here are new patches for 2.6 and 3.0 including changes to doc and test cases. __ Tracker <[EMAIL PROTECTED]> __Index: Lib/test/test_datetime.py ===

[issue1158] %f format for datetime objects

2007-09-16 Thread Skip Montanaro
Changes by Skip Montanaro: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/pyth

[issue1158] %f format for datetime objects

2007-09-13 Thread Brett Cannon
Brett Cannon added the comment: On 9/13/07, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > Skip Montanaro added the comment: > > Brett> Are you going to add support to strptime as well? > > I looked at strptime for about two seconds then moved on. I presume you > would know how to add it easily t

[issue1158] %f format for datetime objects

2007-09-13 Thread Skip Montanaro
Skip Montanaro added the comment: Eric> It's a nit, but there are a few other comments that should be Eric> changed to mention %f in addition to %z/%Z. Yes, thanks. Skip __ Tracker <[EMAIL PROTECTED]> __

[issue1158] %f format for datetime objects

2007-09-13 Thread Skip Montanaro
Skip Montanaro added the comment: Brett> Are you going to add support to strptime as well? I looked at strptime for about two seconds then moved on. I presume you would know how to add it easily though. ;-) Brett> As for the 'time' module, I don't think it would be useful as it serves

[issue1158] %f format for datetime objects

2007-09-13 Thread Eric V. Smith
Eric V. Smith added the comment: It's a nit, but there are a few other comments that should be changed to mention %f in addition to %z/%Z. * giving special meanings to the %z and %Z format codes via a preprocessing /* Scan the input format, looking for %z and %Z escapes, building

[issue1158] %f format for datetime objects

2007-09-12 Thread Brett Cannon
Brett Cannon added the comment: Are you going to add support to strptime as well? As for the 'time' module, I don't think it would be useful as it serves no purpose since the time tuple can't resolve to that resolution. If you do add support, though, I guess you just default to 0. -- n

[issue1158] %f format for datetime objects

2007-09-12 Thread Skip Montanaro
New submission from Skip Montanaro: Attached is a patch for py3k which adds a %f format code to its strftime method. When included in a format string it expands to the number of microseconds in the object. date, time and datetime objects all support the format (though I'm not sure what, if anyt