E&S CVS Commit: PEAK - Instant AOP - just add semantics. :) The 'advice' class is a base for
pje at eby-sarna.com
pje at eby-sarna.com
Wed Nov 27 12:33:00 EST 2002
Module Name: PEAK
Committed By: pje
Date: Wed Nov 27 17:32:55 UTC 2002
Added Files:
PEAK/src/peak/util: advice.py
Log Message:
Instant AOP - just add semantics. :) The 'advice' class is a base for
method wrappers akin to Python's 'classmethod' or 'staticmethod' wrappers.
The difference is that 'advice' instances are just instance methods to
which custom "around advice" semantics can be added. Just subclass
'advice' and override the '__call__' method to put in your custom behavior,
and you're ready to go. Advice instances are stackable, and appear to
Python 'help()' and ZPublisher 'mapply()' as though they were the
underlying method.
This class will form the basis for an 'autocommitted()' method wrapper for
objects supporting optional autocommit semantics. See:
http://www.eby-sarna.com/pipermail/transwarp/2002-November/000228.html
for details.
To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/util/advice.py?rev=1.1&content-type=text/vnd.viewcvs-markup
To generate a diff of this commit:
cvs rdiff -r0 -r1.1 PEAK/src/peak/util/advice.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
More information about the source-changes
mailing list