diff options
| author | Steve Piercy <web@stevepiercy.com> | 2017-11-16 14:56:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-16 14:56:51 -0800 |
| commit | e2022041ba97ac4360bb588aae0acab4c0d2c77e (patch) | |
| tree | 336eb565a38f5dde3547692e991a199841ffd1f1 | |
| parent | cc6a6ed60260b0391aa38f372b26311d58edf0d6 (diff) | |
| parent | e332418cfd91472ec405ca66aa50a34fee9ec67e (diff) | |
| download | pyramid-e2022041ba97ac4360bb588aae0acab4c0d2c77e.tar.gz pyramid-e2022041ba97ac4360bb588aae0acab4c0d2c77e.tar.bz2 pyramid-e2022041ba97ac4360bb588aae0acab4c0d2c77e.zip | |
Merge pull request #3203 from tjwudi/patch-3
Clarify property descriptor in add_request_method
| -rw-r--r-- | pyramid/config/factories.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pyramid/config/factories.py b/pyramid/config/factories.py index c8633cc47..202c3ef61 100644 --- a/pyramid/config/factories.py +++ b/pyramid/config/factories.py @@ -144,9 +144,10 @@ class FactoriesConfiguratorMixin(object): 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``. |
