Permalink
Browse files

Merge pull request #3203 from tjwudi/patch-3

Clarify property descriptor in add_request_method
  • Loading branch information...
2 parents cc6a6ed + e332418 commit e2022041ba97ac4360bb588aae0acab4c0d2c77e @stevepiercy stevepiercy committed Nov 16, 2017
Showing with 4 additions and 3 deletions.
  1. +4 −3 pyramid/config/factories.py
@@ -144,9 +144,10 @@ def add_request_method(self,
When adding a property to the request, ``callable`` can either
be a callable that accepts the request as its single positional
- parameter, or it can be a property descriptor. If ``name`` is
- ``None``, the name of the property will be computed from the
- name of the ``callable``.
+ parameter, or it can be a property descriptor. If ``callable`` is
+ a property descriptor, it has to be an instance of a class which is
+ a subclass of ``property``. If ``name`` is ``None``, the name of
+ the property will be computed from the name of the ``callable``.
If the ``callable`` is a property descriptor a ``ValueError``
will be raised if ``name`` is ``None`` or ``reify`` is ``True``.

0 comments on commit e202204

Please sign in to comment.