Skip to content
Advertisement

Tag: del

Iterate through all @cached_property attributes

For @cached_property decorated methods, is there a built-in way to iterate through all of these attributes? My use case is that I’d like to clear all cached properties with the del operator without bookkeeping for them manually in something like a list. Here’s a canned example. __init__ could do something fancy like load data from a file that needs to

Advertisement