This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jaraco
Recipients
Date 2003-06-26.17:54:12
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Simply put, strftime can't handle the empty string.

>>> import datetime
>>> now = datetime.datetime.utcnow()
>>> now.strftime( '%d' )
'26'
>>> now.strftime( '' )
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
SystemError: C:\Code\23b1
\Objects\stringobject.c:3315: bad argument to internal 
function

This is inconsistent with the docs and the time.strftime 
function.

>>> import time
>>> time.strftime( '', time.gmtime() )
''

Do I need to make any more justification for having the 
empty format string return an empty string?
History
Date User Action Args
2007-08-23 14:14:15adminlinkissue761337 messages
2007-08-23 14:14:15admincreate