Thanks Steven and Kent, both of your suggestions look good to me. I'll try both out and pick one.
Gary


Gary Ruben wrote:
OK, I've managed to get this to work with Rainer's method, but I realised it is not the best way to do it, since the methods are being added by the constructor, i.e. they are instance methods. This means that every time a foo object is created, a whole lot of code is being run. It would be better to do the same thing with class 'static' methods, if this is possible, so that the methods are created just once.
Is this possible?
Gary
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to