bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (#4529)

This commit is contained in:
Berker Peksag 2017-11-24 02:40:26 +03:00 committed by Raymond Hettinger
parent 0858495a50
commit 3df02dbc8e
4 changed files with 19 additions and 12 deletions

View file

@ -69,10 +69,10 @@ structure of :file:`robots.txt` files, see http://www.robotstxt.org/orig.html.
.. method:: request_rate(useragent)
Returns the contents of the ``Request-rate`` parameter from
``robots.txt`` in the form of a :func:`~collections.namedtuple`
``(requests, seconds)``. If there is no such parameter or it doesn't
apply to the *useragent* specified or the ``robots.txt`` entry for this
parameter has invalid syntax, return ``None``.
``robots.txt`` as a :term:`named tuple` ``RequestRate(requests, seconds)``.
If there is no such parameter or it doesn't apply to the *useragent*
specified or the ``robots.txt`` entry for this parameter has invalid
syntax, return ``None``.
.. versionadded:: 3.6