Hello, Strictly speaking, this isn't overloading a method in the way we do it in Java. But similar. Maybe.
I am writing a module for processing web server log files and one of the methods I provide is to extract a given query parameter and its value. Because there are several types of log files with different line structures, I had the thought to write methods with descriptive names that simply returned a generic method that processed the method arguments. e.g., def setpattern_iis(self,pattern,parameter) : type='iis' return pattern_generator(self,type,pattern,parameter) In this case, creating a regular expression to parse the log lines for a query parameter. This is just a bit more "self documenting" than using the generic method with the 'type' argument and requiring the user to enter the type. At the same time, it allows me to put all the parsing code in one method. My question is, is this a bad thing to do in python? Thanks. mp -- Michael Powe mich...@trollope.org Naugatuck CT USA War is a sociological safety valve that cleverly diverts popular hatred for the ruling classes into a happy occasion to mutilate or kill foreign enemies. - Ernest Becker
pgp4F5gOWmvX7.pgp
Description: PGP signature
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor