[issue12265] revamp argument errors

2011-06-07 Thread Oleg Oshmyan
Changes by Oleg Oshmyan : -- nosy: +chortos ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12265] revamp argument errors

2011-06-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 44d46d74ef4f by Benjamin Peterson in branch 'default': greatly improve argument parsing error messages (closes #12265) http://hg.python.org/cpython/rev/44d46d74ef4f -- nosy: +python-dev resolution: -> fixed stage: patch review -> committed

[issue12265] revamp argument errors

2011-06-05 Thread R. David Murray
R. David Murray added the comment: That's why I said "their own source or pydoc...". The language of the error message is trying to describe the error as the interpreter knows about it at the time the error is generated. That has a strong relationship to the prototype, but the two things are

[issue12265] revamp argument errors

2011-06-05 Thread Roger Binns
Roger Binns added the comment: Obviously the prototype can't be provided when it isn't known. But the pseudo-English text is trying to describe the prototype and is far less clear than the actual prototype. ie the developer communicated the prototype to Python in Python syntax, why not have

[issue12265] revamp argument errors

2011-06-05 Thread R. David Murray
R. David Murray added the comment: -1 on adding the prototype (especially since I think it isn't always possible to do so). In many cases it would make the message overlong, and the user can look up the prototype by looking at their source code or using pydoc or their IDE. The error message

[issue12265] revamp argument errors

2011-06-05 Thread Roger Binns
Roger Binns added the comment: Is there any reason it doesn't show the function 'prototype' which is by far the most the useful piece of information and is also a form of documentation (plus fairly hard to work out). Convoluted technospeak is far harder to understand. Compare: TypeError: f

[issue12265] revamp argument errors

2011-06-05 Thread R. David Murray
R. David Murray added the comment: Your parenthetical reads sensibly to me, I can't think of a clearer alternative. -- nosy: +r.david.murray ___ Python tracker ___ _

[issue12265] revamp argument errors

2011-06-05 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue12265] revamp argument errors

2011-06-04 Thread Nick Coghlan
Nick Coghlan added the comment: Looks good in a desk review. Assuming the full test suite passes, +1 from me. -- nosy: +ncoghlan ___ Python tracker ___ _

[issue12265] revamp argument errors

2011-06-04 Thread Benjamin Peterson
Changes by Benjamin Peterson : Added file: http://bugs.python.org/file22253/argerror.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12265] revamp argument errors

2011-06-04 Thread Benjamin Peterson
Changes by Benjamin Peterson : Removed file: http://bugs.python.org/file22252/argerror.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue12265] revamp argument errors

2011-06-04 Thread Benjamin Peterson
New submission from Benjamin Peterson : This patch completely rewrites errors given for positional error mismatches. The goal is to give more informative and correct errors. Some examples: >>> def f(): pass ... >>> f(1) Traceback (most recent call last): File "", line 1, in TypeError: f()