May-22-2018, 09:18 AM
May-22-2018, 12:00 PM
Please elaborate
May-22-2018, 05:18 PM
Python doesn't have by-name overloading like you might see in C++ or Java. It does have named and optional parameters, which can be used to get "overloaded" behavior. You do this by (for example) providing a default value of None, then checking the value inside the single "constructor" (which is usually called an initializer in this case, the __init__ method).