controlling method execution

mic aldo123 at onet.pl
Thu Nov 20 09:37:11 CET 2003


Is it possible to control method exectution using similiar mechanism as with
get/setatrribute special methods for attributes? I'd like to have every (or
some of ) method of class instance run common code defined outside the class
without making any explicit references to it.
To give an example, I'd like to prepare secure environment, in which users
could execute only methods that can be accessed by them. IMO the most
universal way to do it would be to run automatically authorisation routine
before every method execution.

Regards,

Michal






More information about the Python-list mailing list