AOP and pep 246

Kay Schluehr kay.schluehr at gmx.net
Thu Nov 1 12:46:26 EDT 2007


On 1 Nov., 16:18, "Rustom Mody" <rustompm... at gmail.com> wrote:
> I am interested in AOP in python.  From here one naturally (or
> google-ly) reaches peak.
> But peak seems to be discontinued.
> Whereas pep-246 on adaptors seems to be rejected in favor of something else.
>
> What??
>
> Can someone please throw some light on whats the current state of the art?

AOP was a research that gone nowhere - at least not in its orginal
AspectJ form: declaring aspect code that targets business code,
weaving the aspect code into the business app using a code generator.
There was much excitement about it around 2001 that faded away since
then. What's left from the glory are certain classes of higher order
functions - you might call them "decorators".

When you want to restore the AOP research program in its full
flexibility for your own purposes without using a code generator you
can keep a higher order decorator and customize functions following
the rationale of this recipe:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/528929

I do think most people prefer a more direct style of composition that
is better localized. I actually never used this recipe for any
production code.




More information about the Python-list mailing list