[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-06-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset f9f1ccace395a8f65b60dc12567a237b4002fd18 by Victor Stinner (Serhiy Storchaka) in branch 'master': Fix regression in error message introduced in bpo-29951. (#2028) https://github.com/python/cpython/commit/f9f1ccace395a8f65b60dc12567a237b4002fd18

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2094 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Michael. Since most builtin and extension functions and methods now use Argument Clinic and provide a function name, this should be a great enhancement. -- resolution: -> fixed stage: patch review -> resolved status:

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8 by Serhiy Storchaka (Michael Seifert) in branch 'master': bpo-29951: Include function name for some error messages in `PyArg_ParseTuple*` (#916) https://github.com/python/cpython/commit/64c8f705c0121a4b4

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread R. David Murray
R. David Murray added the comment: If you want to be completely unambiguous, you could say "keyword argument names". "keyword argument" appears to mean different things in different contexts; sometimes it means the name and the value together, sometimes one or the other. Usually which one it

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree. PyArg_ValidateKeywordArguments() fooled me. Now I see that it would be better to change only PyArg_ValidateKeywordArguments(). -- ___ Python tracker ___

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread Martin Panter
Martin Panter added the comment: In this test, “keyword arguments” is definitely wrong: >>> f(**{1:2}) -TypeError: f() keywords must be strings +TypeError: f() keyword arguments must be strings To me, a keyword argument is a _value_ passed in using the f(name=. . .) syntax, and the keyword is

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > But are you sure about the "keywords must be strings" -> "keyword arguments > must be strings" change? I always thought the key is the "keyword" and the > value the "(keyword) argument". Now, after you have made change, I have doubts. Yes, it looks ambiguo

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Martin, could you please take a look? Does the wording of error messages look good English? Do you have to suggest some enhancements? -- nosy: +martin.panter ___ Python tracker

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread Michael Seifert
Michael Seifert added the comment: Thank you for the suggestions, I added them to the PR. If you want But are you sure about the "keywords must be strings" -> "keyword arguments must be strings" change? I always thought the key is the "keyword" and the value the "(keyword) argument". ---

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And while we are here, please change "keywords must be strings" to "keyword arguments must be strings" as in PyArg_ValidateKeywordArguments(). And maybe make all TypeError messages starting from a lower letter for uniformity. --

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM in general. I was going to make similar changes. While we a here, maybe add the function name to other TypeError messages specific to the function? "Required argument '%U' (pos %d) not found" and "Argument given by name ('%U') and position (%d)", but no

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-30 Thread Michael Seifert
Changes by Michael Seifert : -- pull_requests: +816 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-30 Thread Michael Seifert
New submission from Michael Seifert: Some exceptions thrown by `PyArg_ParseTupleAndKeywords` refer to "function" or "this function" even when a function name was specified. For example: >>> import bisect >>> bisect.bisect_right([1,2,3,4], 2, low=10) TypeError: 'low' is an invalid keyword argum