How to call a method with variing arguments

Heiko meinmailfilter at gmx.de
Tue Jul 3 02:40:49 EDT 2001


Hello,
I want to do this:

ClassObject = Class()
ClassObject.Method(Arg1, Arg2, Arg3)
...
ClassObject.Method(Arg1, Arg2, Arg3, Arg4, Arg5 ....)
...
ClassObject.Method()
...
and so on.

Means that I want to call a method with a variing number of arguments
and the method decides what to do.
If possible, it would be nice, if the sequence of the arguments
doesn´t matter, and the method realizes which argument is on which
position (but that is a "nice to have"). So, how do I have to declare
the method, that this works?

Thanks
Heiko



More information about the Python-list mailing list