"NetKev" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You are probably right and I think I will do so but just for the sake > of my understanding of python...I noticed somthing. process_log takes > two arguments when called but it's definition has 3 and one of them is > "self". So I'm thinking if I modify my warn_Admin definition to > include "self" and then call it from process_log with > self.warn_Admin... it will work. This explains why I was getting the > "too many arguments" error. >
Yes. When you invoke self.warn_Admin(x), it calls warn_Admin with 2 args, self and x. The reason I did not suggest this is becaus it looked like warn_Admin didn't really use anything inside self, so why make it a method? Looks like you are getting the method/function concepts straight. (I'm not trying to confuse you, but you could also make warn_Admin a staticmethod within the class, using the @staticmethod decorator. Static methods do not pass the self argument, so making warn_Admin into a static method would be another way to resolve this problem. But only do this if your class, whatever it is, has something inherently about it that wants its own warn_Admin method - otherwise, just make it a global function.) -- Paul -- http://mail.python.org/mailman/listinfo/python-list