This link has been bookmarked by 32 people . It was first bookmarked on 22 Apr 2008, by kundeng06.
-
07 May 09
-
09 Oct 08
-
21 May 08
-
18 May 08
-
13 May 08
-
29 Apr 08
-
26 Apr 08
-
24 Apr 08
-
23 Apr 08
-
aspects.py library provides means to intercept function calls. Functions and methods (also in Python standard library and third party code) can be wrapped so that when they are called, the wrap is invoked first. Depending on the wrap, the execution of the original function can be omitted, or the function can be called arbitrarily many times. Wraps are able to modify the arguments and the return value of the original function. In the terminology of aspect-oriented programming, the library allows applying advices (wraps) to call join points of methods and functions in around fashion.
-
-
22 Apr 08
-
21 Apr 08
-
11 Sep 07
-
07 Apr 07
-
20 Dec 06
-
05 Jul 06
-
13 May 06
-
19 Sep 05
-
20 Aug 04
-
his introduces a Python module which implements one essential concept in Aspect Oriented Programming (AOP). Aspect Oriented Programming (AOP) extends Object Oriented Programming so that it allows the programmer to separate properties which are the same regardless of the classes they belong to. In AOP these properties are implemented only once in one place and then merged to the class structure everywhere they belong. For example, validating an SQL query and writing a log entry may be properties which do not need to know where they are executed --- so why write them all over the class structure? In this document a light-weight solution to this problem is presented in Python. The solution is a function which takes an unbound method and another function (also known as advice) as its parameters. The function wraps the method inside the advice. Now when the method is called, the advice receives the control and it may, if it wishes, pass the control to the original method at some point of its execution.
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.