At 12:45 PM 9/10/04 +0100, Andrew Eland wrote: >Over in web-sig, we're discussing PEP 333, the Web Server Gateway >Interface. Rather than defining our own set of constants for the HTTP >status code integers, we thought it would be a good idea to add them to >httplib, allowing other applications to benefit. I've uploaded a patch[1] >to httplib.py and the corresponding documentation. Do people think this is >a good idea? I would also put the statuses in a dictionary, such that: status_code[BAD_GATEWAY] = "Bad Gateway" This could be accomplished via something like: status_code = dict([ (val, key.replace('_',' ').title()) for key,val in globals.items() if key==key.upper() and not key.startswith('HTTP') and not key.startswith('_') ])
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4