All Questions
3 questions
3
votes
5
answers
2k
views
Best way to 'intelligently' reset memoized property values in Python when dependencies change
I'm writing a class with various attributes that I only want to calculate when necessary (lazy evaluation). However, more importantly, I want to make sure that 'stale' values are not returned if any ...
1
vote
1
answer
649
views
Batch-adding properties in Python?
In my code I want to create a bunch of lazy variables, however, if any one of them is being queried, the Load() function as a whole should be called, which will populate all the underlying lazy ...
0
votes
1
answer
62
views
Best way to lazily update calculated properties by hashing dependent attributes
I'm trying to make a bunch of geometric objects which have their intrinsic geometric properties (center point, radius, lengths, etc.), as well as properties to help plot them (like x, y, z coordinates ...