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 eric.smith
Recipients eric.smith, pitrou, serhiy.storchaka, tebeka
Date 2019-09-19.10:04:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568887467.31.0.330781513824.issue38222@roundup.psfhosted.org>
In-reply-to
Content
Correct: this change was made specifically so that objects could add their own format specifiers at a later time. If I recall correctly, This change was precipitated by wanting to add datetime.__format__: this change broke existing uses for format() that formatted datetimes as strings.

But the result is that objects that really just want to be formatted as strings need to have their own __format__ which returns format(str(self), format_spec).
History
Date User Action Args
2019-09-19 10:04:27eric.smithsetrecipients: + eric.smith, tebeka, pitrou, serhiy.storchaka
2019-09-19 10:04:27eric.smithsetmessageid: <1568887467.31.0.330781513824.issue38222@roundup.psfhosted.org>
2019-09-19 10:04:27eric.smithlinkissue38222 messages
2019-09-19 10:04:27eric.smithcreate