Python Documentation Typo

Hello,There is a typo in the documentation at http://docs.python.org/py3k/library/urllib.request.html:>>> import urllib.request
f = urllib.request.urlopen('http://www.python.org/') print(fp.read(100).decode('utf-8')) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm Should be>>> import urllib.request f = urllib.request.urlopen('http://www.python.org/') print(f.read(100).decode('utf-8')) ^^^ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm Cheers.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 18.05.2010 06:16, schrieb Viktor Viktorov:
Hello,
There is a typo in the documentation at http://docs.python.org/py3k/library/urllib.request.html:
import urllib.request f = urllib.request.urlopen('http://www.python.org/') print(fp.read(100).decode('utf-8')) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm
Should be
import urllib.request f = urllib.request.urlopen('http://www.python.org/') print(*f.*read(100).decode('utf-8'))
^^^ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm
Hi Viktor, thanks for the report, this is fixed now in Subversion. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) iEYEARECAAYFAkv29McACgkQN9GcIYhpnLDEfwCfYmenA9W3Wf6mI8gU4zn7C6kT kLMAn2dBuPcN5x85Pj/Vmnot9+HWw6zz =e0Jb -----END PGP SIGNATURE-----
participants (2)
-
Georg Brandl
-
Viktor Viktorov