You can use the decorator module to simplify things a bit:
from decorator import decoratordef loadedBy(loader): def result(self, *args, **kwargs): loader(self) return fn(self, *args, **kwargs) return decorator(result)
Email colin@colinm.org
Lab Wean Hall 1302 (412) 268-2601
Office Wean Hall 1307 (412) 268-4751
Snail Mail Colin McMillen Carnegie Mellon Univ. Computer Science Dept. 5000 Forbes Avenue Pittsburgh, PA 15213 U.S.A.
Use the decorator module
You can use the decorator module to simplify things a bit: