mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Update doc to reflect Tim's changes to bool.
This commit is contained in:
parent
c334df5727
commit
d3dab2b192
8 changed files with 28 additions and 27 deletions
|
|
@ -35,7 +35,7 @@ Parses the lines argument.
|
|||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}{can_fetch}{useragent, url}
|
||||
Returns true if the \var{useragent} is allowed to fetch the \var{url}
|
||||
Returns \code{True} if the \var{useragent} is allowed to fetch the \var{url}
|
||||
according to the rules contained in the parsed \file{robots.txt} file.
|
||||
\end{methoddesc}
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ The following example demonstrates basic use of the RobotFileParser class.
|
|||
>>> rp.set_url("http://www.musi-cal.com/robots.txt")
|
||||
>>> rp.read()
|
||||
>>> rp.can_fetch("*", "http://www.musi-cal.com/cgi-bin/search?city=San+Francisco")
|
||||
0
|
||||
False
|
||||
>>> rp.can_fetch("*", "http://www.musi-cal.com/")
|
||||
1
|
||||
True
|
||||
\end{verbatim}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue