Explain the "why"

This commit is contained in:
Alexander Hess 2026-12-04 09:59:15 +01:00
commit ab6b34b778
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -127,6 +127,8 @@ class City(meta.Base):
Returns: Returns:
self: enabling method chaining self: enabling method chaining
""" """
# `cached_property` keeps its value in the instance's `__dict__`
# => Removing it resets the cache
vars(self).pop("map", None) vars(self).pop("map", None)
return self return self