From: Raymond Hettinger Date: Fri, 8 Apr 2022 02:10:00 +0000 (-0500) Subject: Clarify that this sentence applies to the above example. GH-32405 X-Git-Tag: v3.11.0b1~420 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f4b328e2bbbcc1096a28e903f07868b425397767;p=thirdparty%2FPython%2Fcpython.git Clarify that this sentence applies to the above example. GH-32405 --- diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index a1adf851bdde..da011ccb29ed 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"