[Python-3000] __format__ and datetime

Guido van Rossum guido at python.org
Mon Sep 10 18:42:05 CEST 2007


On 9/10/07, Eric Smith <eric+python-dev at trueblade.com> wrote:
> I have a patch to add __format__ to datetime.time, .date, and .datetime.
>   For non-empty format_spec's, I just pass on to .strftime.  For empty
> format_spec's, it returns str(self).
>
> I think this is the only reasonable interpretation of format_spec's for
> datetime.  Does anyone think otherwise?

+1

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list