You might be interested in http://micheles.googlecode.com/hg/decorator/documentation.html