Overloading Methods

TheFlyingDutchman zzbbaadd at aol.com
Wed Jan 21 03:34:19 CET 2009

> class Foo(object):
>     def __init__(self, a, b=10, c=None):

> Whereas in Java or C++ this would require several overloads, it can be
> succinctly expressed as a single method in Python.

Not that it's important to the discussion, but, while Java does not
have the capability to give default method parameters, C++ does.

More information about the Python-list mailing list