As an early step toward implementing an observer pattern, I built a simpler protocol that sets a mutable object's attribute to zero whenever the object changes state. If you guys would like to try it out, see the patch at www.python.org/sf/555251. I tried to time the cost of frequent attribute resets but they were so fast I couldn't produce a measurable difference. Raymond Hettinger Here's a sample session: >>> a = list('abcd') >>> a.cachevalid 0 >>> a.cachevalid=1 >>> a.cachevalid 1 >>> a[2] = 'k' >>> a.cachevalid 0
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4