[issue7994] object.__format__ should reject format strings

R. David Murray report at bugs.python.org
Thu Mar 20 01:05:58 CET 2014


R. David Murray added the comment:

Yes.  It is not returning the format specifier, it is filling in the strftime template "s" from the datetime...which equals "s", since it consists of just that constant string.

Try {:%Y-%m-%d}, for example.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7994>
_______________________________________


More information about the Python-bugs-list mailing list