Skip to content

Commit 0fe1b87

Browse files
committed
Adding note about url needing to be encoded when provided to the urlopen function as well as the Request class.
1 parent cef542c commit 0fe1b87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/urllib.request.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ The :mod:`urllib.request` module defines the following functions:
2828

2929
.. function:: urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=False, context=None)
3030

31-
Open the URL *url*, which can be either a string or a
32-
:class:`Request` object.
31+
Open *url*, which can be either a string containing a valid, properly
32+
encoded, URL or a :class:`Request` object.
3333

3434
*data* must be an object specifying additional data to be sent to the
3535
server, or ``None`` if no such data is needed. See :class:`Request`
@@ -192,7 +192,7 @@ The following classes are provided:
192192

193193
This class is an abstraction of a URL request.
194194

195-
*url* should be a string containing a valid URL.
195+
*url* should be a string containing a valid, properly encoded, URL.
196196

197197
*data* must be an object specifying additional data to send to the
198198
server, or ``None`` if no such data is needed. Currently HTTP

0 commit comments

Comments
 (0)