summaryrefslogtreecommitdiffstats
path: root/Doc/faq/programming.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2022-04-08 02:10:00 (GMT)
committerGitHub <noreply@github.com>2022-04-08 02:10:00 (GMT)
commitf4b328e2bbbcc1096a28e903f07868b425397767 (patch)
treee4e07d3f74362d5fbe13333bcea32d60041776b7 /Doc/faq/programming.rst
parente2d78baed385c349d756e96d8f0def0268fa9c4f (diff)
downloadcpython-f4b328e2bbbcc1096a28e903f07868b425397767.zip
cpython-f4b328e2bbbcc1096a28e903f07868b425397767.tar.gz
cpython-f4b328e2bbbcc1096a28e903f07868b425397767.tar.bz2
Clarify that this sentence applies to the above example. GH-32405
Diffstat (limited to 'Doc/faq/programming.rst')
-rw-r--r--Doc/faq/programming.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst
index a1adf85..da011cc 100644
--- a/Doc/faq/programming.rst
+++ b/Doc/faq/programming.rst
@@ -1951,9 +1951,9 @@ relevant instance attributes are mutable, the *cached_property* approach
can't be made to work because it cannot detect changes to the
attributes.
-The *lru_cache* approach can be made to work, but the class needs to define the
-*__eq__* and *__hash__* methods so the cache can detect relevant attribute
-updates::
+To make the *lru_cache* approach work when the *station_id* is mutable,
+the class needs to define the *__eq__* and *__hash__* methods so that
+the cache can detect relevant attribute updates::
class Weather:
"Example with a mutable station identifier"