How to get the number of args of a built-in function in Python?
<p>I need to programmatically get the number of arguments that a function requires. With functions declared in modules this is trivial:</p>

<pre><code>myfunc.func_code.co_argcount
</code></pre>

<p>But built-in functions don't have the <code>func_code</code> attribute. Is there another way to do this? Otherwise I can't use the built-ins and have to re-write them in my code.</p>

<p>[addition] Thanks for the responses, hope they'll be useful. I have used Pypy instead.</p>
