[Python-checkins] cpython: Doc improvements suggested by Éric Araujo for the new 'HEAD' Request feature.
senthil.kumaran
python-checkins at python.org
Wed Oct 19 20:37:19 CEST 2011
http://hg.python.org/cpython/rev/554048b22e07
changeset: 72997:554048b22e07
user: Senthil Kumaran <senthil at uthcode.com>
date: Thu Oct 20 02:37:08 2011 +0800
summary:
Doc improvements suggested by Éric Araujo for the new 'HEAD' Request feature.
files:
Doc/library/urllib.request.rst | 12 ++++++------
Doc/whatsnew/3.3.rst | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -177,7 +177,7 @@
*method* should be a string that indicates the HTTP request method that
will be used (e.g. ``'HEAD'``). Its value is stored in the
- :attr:`Request.method` attribute and is used by :meth:`Request.get_method()`.
+ :attr:`~Request.method` attribute and is used by :meth:`get_method()`.
.. versionchanged:: 3.3
:attr:`Request.method` argument is added to the Request class.
@@ -379,11 +379,11 @@
.. attribute:: Request.method
The HTTP request method to use. This value is used by
- :meth:`Request.get_method` to override the computed HTTP request
- method that would otherwise be returned. This attribute is
- initialized with the value of the *method* argument passed to the constructor.
+ :meth:`~Request.get_method` to override the computed HTTP request
+ method that would otherwise be returned. This attribute is initialized with
+ the value of the *method* argument passed to the constructor.
- ..versionadded:: 3.3
+ .. versionadded:: 3.3
.. method:: Request.add_data(data)
@@ -400,7 +400,7 @@
This is only meaningful for HTTP requests.
.. versionchanged:: 3.3
- get_method now looks at the value of :attr:`Request.method` first.
+ get_method now looks at the value of :attr:`Request.method`.
.. method:: Request.has_data()
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -484,7 +484,7 @@
The :class:`~urllib.request.Request` class, now accepts a *method* argument
used by :meth:`~urllib.request.Request.get_method` to determine what HTTP method
-should be used. For example, this will send an ``'HEAD'`` request::
+should be used. For example, this will send a ``'HEAD'`` request::
>>> urlopen(Request('http://www.python.org', method='HEAD'))
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list