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 demian.brecht
Recipients barry, berker.peksag, demian.brecht, ethan.furman, martin.panter, orsenthil, python-dev, r.david.murray, rhettinger, serhiy.storchaka
Date 2015-02-20.16:31:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <01363711-8569-4D4D-BC85-310076F50EEE@gmail.com>
In-reply-to <1424440140.48.0.435474095763.issue21793@psf.upfronthosting.co.za>
Content
The updated patch addresses comments which I’d somehow missed previously, but keeps the log fix to the __str__ implementation of HTTPStatus (using int.__str__ rather than format()).

> Does not changing __str__ to decimal representation (and in this case __str__ = int.__str__ may be better) lost a part of the point of converting HTTP status codes to enums?

I don’t think so. In the case of HTTPStatus in general, I think that the optimal string representation of an element of the enum is the stringified version of the status code. If nothing else, it’s consistent with the other type of status code that can be used (ints).

That does lead me to something that I think is a little odd about IntEnums in general but I’ll ask that question in python-dev rather than here as to not conflate this issue.
Files
File name Uploaded
issue21793_logfix_2.patch demian.brecht, 2015-02-20.16:31:35
History
Date User Action Args
2015-02-20 16:31:35demian.brechtsetrecipients: + demian.brecht, barry, rhettinger, orsenthil, r.david.murray, ethan.furman, python-dev, berker.peksag, martin.panter, serhiy.storchaka
2015-02-20 16:31:35demian.brechtlinkissue21793 messages
2015-02-20 16:31:35demian.brechtcreate