Feb. 21, 2015
3:35 p.m.
On 21.02.15 16:26, Nick Coghlan wrote:
Likewise, although as Rob noted, it's sometimes to desirable to use the "Z should be X, not Y" form if the shorter form would be ambiguous.
Z is not always available.
Perhaps this should be a recommendation in both PEP 7 & 8? It's exactly the kind of issue where having a recommended way to do it can save a fair bit of time considering the exact phrasing of error messages, as well as improving the developer experience by providing more consistent feedback on error details.
It would be great. I'm going to change standard messages in PyArg_Parse* and common converting functions (as PyLong_AsLong and PyObject_GetBuffer) to make them uniform.