Skip to content

Commit 0a09093

Browse files
committed
Correct docstring of _make_cached_property_uncached
1 parent 4f8f814 commit 0a09093

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/attr/_make.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,9 @@ def _transform_attrs(
498498
def _make_cached_property_uncached(original_cached_property_func, cls):
499499
"""Make an ordinary :deco:`property` to replace a :deco:`cached_property`
500500
501-
This is mainly done for documentation purposes. The generated
502-
:deco:`property` won't be called, because of our custom :meth:`__getattr__`.
503-
We still want it there, so that its docstring is accessible, both to
504-
:function:`help` and to documentation generators, such as Sphinx.
501+
The :deco:`property` will work on slotted instances. We'll make a slot
502+
to keep the result of :func:`original_cached_property_func`, named like it,
503+
with the suffix ``_cached``.
505504
506505
"""
507506
name = original_cached_property_func.__name__

0 commit comments

Comments
 (0)