This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients EvensF, WolfgangFahl, serhiy.storchaka
Date 2020-08-29.14:04:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
I agree that the error message should contain the name of the absent parameter instead of its index when parameters are supplied as a dict. It is more informative and would consistent with other error message.

As for including the number of a record in the error message, I am not sure we should do this.

1. For other errors (too large integer, string containing surrogate characters, error in custom adapter, etc) the error message does not contain neither parameter name nor index. If we want to attach references to parameter and record, it is much more larger problem. It may require designing a general method for attaching additional information to exceptions and writing a PEP. It is a LARGE problem.

2. ProgrammingError is a programming error. In correctly working program you should never see such kind of errors, because you are responsible for preparing the statement and providing the consistent number of parameter values.
History
Date User Action Args
2020-08-29 14:04:49serhiy.storchakasetrecipients: + serhiy.storchaka, EvensF, WolfgangFahl
2020-08-29 14:04:49serhiy.storchakasetmessageid: <[email protected]>
2020-08-29 14:04:49serhiy.storchakalinkissue41638 messages
2020-08-29 14:04:49serhiy.storchakacreate