[Python-checkins] python/dist/src/Doc/lib liburllib2.tex,1.19,1.20
kbk at users.sourceforge.net
kbk at users.sourceforge.net
Sun Jul 11 04:13:19 CEST 2004
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13716
Modified Files:
liburllib2.tex
Log Message:
Patch 851752 (fixes bug 820583)
Patch by John J Lee
Reviewed by Jeff Epler / KBK
Doc built OK.
urlopen() may return None if no handler handles the request.
Also clarify what install_opener does.
M liburllib2.tex
Index: liburllib2.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib2.tex,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** liburllib2.tex 10 Jul 2004 18:28:33 -0000 1.19
--- liburllib2.tex 11 Jul 2004 02:13:17 -0000 1.20
***************
*** 34,43 ****
Raises \exception{URLError} on errors.
\end{funcdesc}
\begin{funcdesc}{install_opener}{opener}
! Install an \class{OpenerDirector} instance as the default opener.
! The code does not check for a real \class{OpenerDirector}, and any
! class with the appropriate interface will work.
\end{funcdesc}
--- 34,50 ----
Raises \exception{URLError} on errors.
+
+ Note that \code{None} may be returned if no handler handles the
+ request (though the default installed global \class{OpenerDirector}
+ uses \class{UnknownHandler} to ensure this never happens).
\end{funcdesc}
\begin{funcdesc}{install_opener}{opener}
! Install an \class{OpenerDirector} instance as the default global
! opener. Installing an opener is only necessary if you want urlopen to
! use that opener; otherwise, simply call \method{OpenerDirector.open()}
! instead of \function{urlopen()}. The code does not check for a real
! \class{OpenerDirector}, and any class with the appropriate interface
! will work.
\end{funcdesc}
More information about the Python-checkins
mailing list