Message354930
The documentation doesn't mention ``__set_name__``, but it does say that cached_property is useful for properties which are "effectively immutable".
The ``__set_name__`` error message is pretty cryptic, that seems to have something to do with this PEP:
https://www.python.org/dev/peps/pep-0487/
but why it is relevant here, I don't know. I would expect that cached_property should apply only to read-only properties.
So I think that at the very least, this needs better documentation and a better error message. |
|
Date |
User |
Action |
Args |
2019-10-19 07:53:20 | steven.daprano | set | recipients:
+ steven.daprano, docs@python, hongweipeng |
2019-10-19 07:53:20 | steven.daprano | set | messageid: <1571471600.82.0.863997888996.issue38524@roundup.psfhosted.org> |
2019-10-19 07:53:20 | steven.daprano | link | issue38524 messages |
2019-10-19 07:53:20 | steven.daprano | create | |
|