From 0928815fb0579658e405a6b63224fe098d37c133 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sun, 10 Feb 2013 01:28:55 +0200 Subject: remove the tedious/needless "if passed" phrases Also, improve a statement that can be mistaken to mean that assigning None to some argument does not count as "passed". --- pyramid/response.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyramid/response.py b/pyramid/response.py index 1dccb7ae8..0f61af472 100644 --- a/pyramid/response.py +++ b/pyramid/response.py @@ -35,20 +35,20 @@ class FileResponse(Response): ``path`` is a file path on disk. - ``request`` must be a Pyramid :term:`request` object if passed. Note + ``request`` must be a Pyramid :term:`request` object. Note that a request *must* be passed if the response is meant to attempt to use the ``wsgi.file_wrapper`` feature of the web server that you're using to serve your Pyramid application. - ``cache_max_age`` if passed, is the number of seconds that should be used + ``cache_max_age`` is the number of seconds that should be used to HTTP cache this response. - ``content_type``, if passed, is the content_type of the response. + ``content_type`` is the content_type of the response. - ``content_encoding``, if passed is the content_encoding of the response. + ``content_encoding`` is the content_encoding of the response. It's generally safe to leave this set to ``None`` if you're serving a - binary file. This argument will be ignored if you don't also pass - ``content-type``. + binary file. This argument will be ignored if you also leave + ``content-type`` as ``None``. """ def __init__(self, path, request=None, cache_max_age=None, content_type=None, content_encoding=None): -- cgit v1.2.3