Serhiy Storchaka added the comment: str(x=1) is not the best example since str() takes keyword arguments. Look at tuple() and list():
>>> tuple(x=1) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: tuple() takes no keyword arguments >>> list(x=1) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: list() takes no keyword arguments Initial version of my patch for issue31506 reported error messages similar to tuple() and list(), but at end I simplified it since in any case the error message was not perfect. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31527> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com