[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The PR LGTM. Thank you for your contribution SylvainDe! -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker _

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7445381c606faf20e253da42656db478a4349f8e by Serhiy Storchaka (Sylvain) in branch 'master': bpo-30600: Fix error messages (condition order in Argument Clinic) (#2051) https://github.com/python/cpython/commit/7445381c606faf20e253da42656db478a4349f

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-09 Thread SylvainDe
Changes by SylvainDe : -- pull_requests: +2113 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-09 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This commit only exposed existing bug in Argument Clinic. The same bug should be exposed for other methods that takes no keyword arguments converted to Argument Clinic. -- ___ Python tracker

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-09 Thread SylvainDe
SylvainDe added the comment: Thanks Serhiy Storchaka for the tip! I am currently investigating how the argument clinic works. I have used git bisect to find when the issue got introduced. commit fdd42c481edba4261f861fc1dfe24bbd79b5a17a bpo-20185: Convert list object implementation to Argument

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, pleas do this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-08 Thread SylvainDe
SylvainDe added the comment: Can I give this a try or is anyone working on this already ? -- ___ Python tracker ___ ___ Python-bugs-li

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! This issue is similar to issue30534, but caused by generated code. The solution is easy: make Argument Clinic (Tools/clinic/clinic.py) generating _PyArg_NoStackKeywords() before _PyArg_ParseStack() and regenerate all generated by Argument Clinic

[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-08 Thread SylvainDe
New submission from SylvainDe: Issue found while trying to write tests for https://bugs.python.org/issue30592 . Issue related to http://bugs.python.org/issue30534 . The following code: [].index(x=2) should raise the following error: TypeError: index() takes no keyword arguments bu