Message236304
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. |
|
Date |
User |
Action |
Args |
2015-02-20 16:31:35 | demian.brecht | set | recipients:
+ demian.brecht, barry, rhettinger, orsenthil, r.david.murray, ethan.furman, python-dev, berker.peksag, martin.panter, serhiy.storchaka |
2015-02-20 16:31:35 | demian.brecht | link | issue21793 messages |
2015-02-20 16:31:35 | demian.brecht | create | |
|