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