From 36164ac5a88a8b878d9c62c652bea840d3e9e461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 17 Jan 2020 16:04:45 -0500 Subject: say something about the predicate factory info arg --- docs/narr/urldispatch.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 9c1495df1..bc2509e3f 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -1128,6 +1128,7 @@ See this code: We register this class as a :term:`predicate factory` with the ``any_of`` keyword argument name. Then we use that new keyword argument with :meth:`~pyramid.config.Configurator.add_route`. When the route is requested, Pyramid instantiates the ``AnyOfPredicate`` class using the value passed to the ``any_of`` argument. +(The ``info`` parameter passed to the factory contains some metadata, you can ignore it for now.) The resulting instance is a :term:`predicate`. It will determine whether incoming requests satisfy its condition. In the example above, a request for ``/three`` would match the route's URL pattern and satisfy the route's predicate because ``three`` is one of the allowed values, so the route would be matched. -- cgit v1.2.3