Brian Quinlan <brian@sweetapp.com> writes: > That is definitely one possible way to do it. However, I am wrapping a > complete DOM, with dozens of objects containing, collectively, hundreds > of methods. > > Adding an explicit check to each method seemed like a lot more pain than > using proxies. You don't have to add it to every method. You can perform the check in tp_getattro before performing the method lookup. Alternatively, you can change the ob_type of the object to simply drop the methods that are not available anymore. Regards, Martin
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