--- Fredrik Lundh <[EMAIL PROTECTED]> wrote: > so phrases like
<sniped> > (etc) > > doesn't tell you that polymorphism is a fundamental > part of the language, > and used all over the place. or did you have a > non-OO meaning of the > word in mind? Ok, I prefer to think that I could be more specific. So, let's try again. Supose that I want to create two methos (inside a class) with exactly same name, but number of parameters different: class myClass: myAttribute = 0 def myMethod(self): self.myAttribute += 1 def myMethod(self, myValue): self.myAttribute += myValue Both method hold same identifier, the only difference in them signture are parameters. How could I simulate the situation above, using the language dynamic link (or polymorphism, as you prefer)? Look, I don't want to use things like: .... def myMethod(self, myValue=None): if(not myValue): self.myAttribute += 1 else: self.myAttribute += myValue .... I want to use the power of polymorphism to modelate the problem. Thanks and best regards Cadu Moreira __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 -- http://mail.python.org/mailman/listinfo/python-list