Why __init__ in python fail <p>I'm using python2.7 to define a function like this</p> <pre><code>def foo(*args, **kwargs): print 'args = ', args print 'kwargs = ', kwargs print '---------------------------------------' </code></pre> <p>and by calling foo(3), the output is as the following:</p> <pre><code>args = (3,) kwargs = {} </code></pre> <p>which is desired.</p> <p>But as for <code>__init__</code> function in a class in which the parameters are the same form as foo, I can't instantize the class Person by invoking <code>Person(3)</code></p> <pre><code>def Person(): def __init__(self, *args, **kwargs): print args print kwargs x = Person(3) </code></pre> <p>The output is</p> <pre><code> x = Person(3) TypeError: Person() takes no arguments (1 given) </code></pre> <p>That confused me a lot, have I missed something?</p>