Overloading in Python

Some say Python doesn’t allow overloading of methods or constructors. Well, they are right in some way!  A coding example below, [sourcecode language="python"] def add(a,b): return a+b def add(a,b,c): return a+b+c print add(4,5) [/sourcecode] If you try to run the above piece of code, you get an error stating, “TypeError: add() takes exactly 3 arguments … Continue reading Overloading in Python