Overloaded constructor in Python from C++ perspective
<p>There is this code:</p>

<pre><code>#include &lt;iostream&gt;
class SomeClass
{
  int someInteger;
  float someFloat;
public:
  SomeClass(int someInteger_)
  {
    // do something for int
    std::cout &lt;&lt; "Int constructor\n";
  }
  SomeClass(float someFloat_)
  {
    // do something for float
    std::cout &lt;&lt; "Float constructor\n";
  }
};

int main()
{
  SomeClass a(2);
  SomeClass b(2.0f);
  return 0;
}
</code></pre>

<p>Objects of class SomeClass are differently created when float or int arguments for constructors are passed. There is similar class in Python:</p>

<pre><code>class SomeClass:
    someInteger = 0
    someFloat = 0.0
    def __init__(self, value):
        # I want to do different things when int or float is passed
        print value

a = SomeClass(2)
b = SomeClass(2.0)
</code></pre>

<p>General question is - how to make function behavior dependent from types of passed arguments?</p>
