[docs] [issue15922] make howto/urllib2.rst doctests pass

Ezio Melotti report at bugs.python.org
Mon Sep 17 13:58:07 CEST 2012


Ezio Melotti added the comment:

+    >>> try:
+    ...     urllib.request.urlopen(req)
+    ... except urllib.error.URLError as e:
+    ...    print("Error opening url.")
+    ...    # E.g. "[Errno 8] nodename nor servname provided, or not known"
+    ...    print("Reason:", e.reason)  #doctest: +ELLIPSIS
+    Error opening url.
+    Reason: ...

I think the previous version was clearer, so maybe this should be a skip.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15922>
_______________________________________


More information about the docs mailing list