diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 32127e33805..73845537223 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -1197,17 +1197,13 @@ In addition to the examples below, more examples are given in :ref:`urllib-howto`. This example gets the python.org main page and displays the first 300 bytes of -it. :: +it:: >>> import urllib.request >>> with urllib.request.urlopen('http://www.python.org/') as f: ... print(f.read(300)) ... - b'\n\n\n\n\n
\n - \n -