Using HTTPStatus instead of own defined constants #8167
Unanswered
sevdog
asked this question in
Ideas & Suggestions
Replies: 1 comment 3 replies
-
I'd probably need to consider the merits of this based on an actual pull request. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Starting from Python 3.5 the http module has defined an enum
HTTPStatus
which has a collection of HTTP status codes just like that instatus
module.This enum is already used by Django itself.
There are some status codes which are present in this library module which are not already present into the standard lib enum, but they may be added at some point (and the missing ones are very few corner case status).
It could be a good idea to have this enum also here, thus avoiding the boilerplate constants definition?
Beta Was this translation helpful? Give feedback.
All reactions