newbie-question: overloading methods

merman merman at freenet.de
Sat May 18 10:53:11 EDT 2002


> Does this help?

Yes Emile - this helps! Thanx ;-).

> >>> def test(arg1=None, arg2=None, arg3=None, *args, **kwargs):
> ...     print arg1, arg2, arg3, args, kwargs
> ...
> >>> test(1,2)
> 1 2 None () {}
> >>> test(1,2,3,4)
> 1 2 3 (4,) {}
> >>> test(1,2,3,4,5,helpmode=1)
> 1 2 3 (4, 5) {'helpmode': 1}






More information about the Python-list mailing list