diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 5d1d8a245907c6..d71defbb2a31ad 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -1208,17 +1208,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 -