Properties, Methods, Events
Fredrik Lundh
fredrik at pythonware.com
Tue May 8 12:33:37 EDT 2001
More information about the Python-list mailing list
Tue May 8 12:33:37 EDT 2001
- Previous message (by thread): Properties, Methods, Events
- Next message (by thread): Properties, Methods, Events
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
John Flynn wrote: > > Do you know of any way to trap an ordinary method call? Eg. if Time- > > Bomb has a method 'tick', can we find a way to know automatically when > > it is called? > > Ahem... On second thoughts, this goes down as the dopiest and most > meaningless question in history. why? assuming that you meant "... when it is called, without modifying the method", it's a rather interesting question. (hint: let __getattr__ return a proxy object if the member is callable, and let that object call the original method from its __call__ method) Cheers /F
- Previous message (by thread): Properties, Methods, Events
- Next message (by thread): Properties, Methods, Events
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list