1. ramkalari
  2. CherryPy


Robert Brewer  committed d0dd1ee

Doc work.

  • Participants
  • Parent commits 2475459
  • Branches default

Comments (0)

Files changed (2)

File cherrypy/_cprequest.py

View file
  • Ignore whitespace
 class Request(object):
-    """An HTTP request."""
+    """An HTTP request.
+    This object represents the metadata of an HTTP request message;
+    that is, it contains attributes which describe the environment
+    in which the request URL, headers, and body were sent (if you
+    want tools to interpret the headers and body, those are elsewhere,
+    mostly in Tools). This 'metadata' consists of socket data,
+    transport characteristics, and the Request-Line. This object
+    also contains data regarding the configuration in effect for
+    the given URL, and the execution plan for generating a response.
+    """
     prev = None
 class Response(object):
-    """An HTTP Response."""
+    """An HTTP Response, including status, headers, and body.
+    Application developers should use Response.headers (a dict) to
+    set or modify HTTP response headers. When the response is finalized,
+    Response.headers is transformed into Response.header_list as
+    (key, value) tuples.
+    """
     # Class attributes for dev-time introspection.
     status = ""
         return newbody
     def finalize(self):
-        """Transform headers (and cookies) into cherrypy.response.header_list."""
+        """Transform headers (and cookies) into self.header_list."""
             code, reason, _ = http.valid_status(self.status)
         except ValueError, x:

File cherrypy/lib/__init__.py

View file
  • Ignore whitespace
         if o.name == 'False':
             return False
-        # See if the Name is a package or module
+        # See if the Name is a package or module. If it is, import it.
             return modules(o.name)
         except ImportError: