Skip to content
Myr

Fix formatting of status code example

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by lzutao · committed by GitHub · parent 3d968ff · Browse files · 1 file+10 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−7 removed

  • other:+10 added−7 removed

1 file+10 added−7 removed

modified:requests/status_codes.py+10 added-7 removed
2 unmodified lines
3r"""4The ``codes`` object defines a mapping from common names for HTTP statuses5to their numerical codes, accessible either as attributes or as dictionary6items.7>>> import requests8>>> requests.codes['temporary_redirect']930710>>> requests.codes.teapot1141812>>> requests.codes['\o/']1320078Example::910 >>> import requests11 >>> requests.codes['temporary_redirect']12 30713 >>> requests.codes.teapot14 41815 >>> requests.codes['\o/']16 2001718Some codes have multiple names, and both upper- and lower-case versions of19the names are allowed. For example, ``codes.ok``, ``codes.OK``, and20``codes.okay`` all correspond to the HTTP status code 200.21"""
102 unmodified lines