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 zach.ware
Recipients Gawain Bolton, eric.smith, zach.ware
Date 2019-05-03.20:50:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556916624.81.0.0971057919994.issue36787@roundup.psfhosted.org>
In-reply-to
Content
You can use `!s` to be sure that the object is a string:

>>> '{!s:^10}'.format(None)
'   None   '

I think it's unlikely the behavior of NoneType.__format__ will be changed, but I'm adding Eric Smith to make that determination as the maintainer of str.format.

See issue7994 for the background on the change that produced this behavior.
History
Date User Action Args
2019-05-03 20:50:24zach.waresetrecipients: + zach.ware, eric.smith, Gawain Bolton
2019-05-03 20:50:24zach.waresetmessageid: <1556916624.81.0.0971057919994.issue36787@roundup.psfhosted.org>
2019-05-03 20:50:24zach.warelinkissue36787 messages
2019-05-03 20:50:24zach.warecreate