Well you only get one request factory. Thus there is only one point in your
app where you can extend the request using this hook. The introduction of
the request methods allows you to extend the request from any addon/plugin
in your app and they can all interoperate on the same request object
without plugins having to provide request mixins, etc, that you throw into
a custom factory. Request methods also support conflict resolution. Thus,
if multiple addons extend the request with the same method/property you
will see an error or an override, as defined by Pyramid's include mechanism.


On Wed, Feb 6, 2013 at 3:15 PM, Wyatt Baldwin
<[email protected]>wrote:

> The docs say config.add_request_method() "is the recommended method for
> extending the request object and should be used in favor of providing a
> custom request factory via
> pyramid.config.Configurator.set_request_factory()" but doesn't say why (or
> at least not that I could find).
>
> Does anyone have any thoughts on the pros and cons of each approach and
> especially why add_request_method is recommended?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to