From: "Greg Ewing" <greg@cosc.canterbury.ac.nz> > Having thought it through a bit more, you're probably > right. I just thought it might appeal to Magnus, since > he seems to be fond of lots of layers of magic, without > much if any regard for performance... FWIW, the early results from my test implementation is that there is no measurable performance impact if an observer function has not been attached or if the observer function is a short C call (perhaps setting a flag or logging the object id). The only way to slow it down enough for the timer to notice seems to be attaching a pure python function to be notified. IOW, the observer pattern doesn't slow you down until you need it. And, if you need it, then you're probably doing it to save much more time being spent on repeated checks to see if a change has taken place and to save programmer effort by de-coupling the objects. BTW, Magnus rules. i-haven't-forgotten-+1-votes-on-generator-enhancements-ly yours <wink>, Raymond Hettinger _ ~ @ @ \_/
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