wrapping all class methods
Robin Becker
robin at jessikat.fsnet.co.uk
Fri Nov 15 11:30:03 EST 2002
In message <JHEOKEOOLIGLDHCMAHMOMEOOENAA.marklists at mceahern.com>, Mark
McEahern <marklists at mceahern.com> writes
>[Robin Becker]
>> What's the 'proper' pythonic way to do this kind of global wrapping?
>
Thanks very much for the pointer, I'll have a look.
>Hi Robin, I don't know the answer, but I think aspect-oriented programming
>provides some ideas. Pedro Rodriguez has posted working code for doing AOP
>to the list:
>
>http://groups.google.com/groups?selm=pan.2002.01.22.15.52.49.832551.1637%40c
>lub-internet.fr
>
>Perhaps, if nothing else, Pedro's code may give you some ideas? I'd be very
>interested to hear what you come up with.
>
>What you're trying to do can be done with metaclasses fairly easily--but
>that requires (afaik) modifying the modules you want to wrap. Which makes
>it not a very good strategy for AOP (as Pedro has pointed out). See this
>thread:
>
>http://groups.google.com/groups?selm=mailman.1025278420.26105.python-list%40
>python.org
>
>Cheers,
>
>// mark
>
>-
>
>
--
Robin Becker
More information about the Python-list
mailing list