[issue31335] str.format should support "{:r}" for any type.

2017-09-04 Thread Alastair Houghton
Alastair Houghton added the comment: Having looked carefully through the current code, I notice that the error message *has* been improved (though it'd be nice if it included a copy of the format string it's rejecting), and also that the alternative "{!r}".format

[issue31335] str.format should support "{:r}" for any type.

2017-09-04 Thread Alastair Houghton
New submission from Alastair Houghton: Currently if you do "{:r}".format(None) you get the error message TypeError: non-empty format string passed to object.__format__ or on newer versions TypeError: non-empty format string passed to NoneType.__format__ (which is at l