<div dir="ltr">Good eye! I did the following grep:<div><br></div><div><div>~/cpython: grep -R takes.exac *</div><div>Doc/c-api/bytes.rst: Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two</div><div>Doc/c-api/unicode.rst: Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two</div><div>Doc/library/unittest.mock.rst: TypeError: <lambda>() takes exactly 3 arguments (1 given)</div><div>Doc/whatsnew/2.0.rst:The ``\x`` escape in string literals now takes exactly 2 hex digits. Previously</div><div>Lib/test/test_compileall.py: def test_d_takes_exactly_one_dir(self):</div><div>Lib/test/test_inspect.py: # f1 takes exactly 2 arguments</div><div>Lib/test/test_inspect.py: # f1/f2 takes exactly/at most 2 arguments</div><div>Lib/tkinter/__init__.py: # TypeError: setvar() takes exactly 3 arguments (2 given)</div><div>Modules/_ctypes/_ctypes.c: "call takes exactly %d arguments xxx (%zd given)",</div><div>Objects/methodobject.c: "%.200s() takes exactly one argument (%zd given)",</div><div>Binary file Objects/methodobject.o matches</div><div>Binary file Programs/_freeze_importlib matches</div><div>Binary file Programs/_testembed matches</div><div>Python/ceval.c: "%.200s() takes exactly one argument (%d given)",</div><div>Python/ceval.c.orig: "%.200s() takes exactly one argument (%d given)",</div><div>Binary file Python/ceval.o matches</div><div>Binary file libpython3.5dm.a matches</div><div>Binary file python.exe matches</div></div><div><br></div><div>I'll keep searching…</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 9:52 AM, Stefan Ring <span dir="ltr"><<a href="mailto:stefanrin@gmail.com" target="_blank">stefanrin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Jan 20, 2015 at 3:35 PM, Neil Girdhar <<a href="mailto:mistersheik@gmail.com">mistersheik@gmail.com</a>> wrote:<br>
> I get error:<br>
><br>
> TypeError: init_builtin() takes exactly 1 argument (0 given)<br>
><br>
> The only source file that can generate that error is<br>
> Modules/_ctypes/_ctypes.c, but when I make changes to that file such as:<br>
><br>
> PyErr_Format(PyExc_TypeError,<br>
> "call takes exactly %d arguments XYZABC (%zd given)",<br>
> inargs_index, actual_args);<br>
><br>
> I do not see any difference after make clean and a full rebuild. How is<br>
> this possible? I need to debug the arguments passed.<br>
<br>
</div></div>The message says "argument", the source code says "arguments" (I<br>
suppose that you only added the XYZABC), so this cannot be source of<br>
this exception.<br>
<br>
grep for "given" in ceval.c<br>
</blockquote></div><br></div>