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 vajrasky
Recipients vajrasky
Date 2013-12-15.05:23:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387085002.5.0.729792789255.issue19984@psf.upfronthosting.co.za>
In-reply-to
Content
This ticket sprung from this discussion:
https://mail.python.org/pipermail/python-dev/2013-December/130756.html

Basically I am always confused when writing error message in C-API.

Is it:

PyErr_Format(PyExc_TypeError,"can't intern %.400s", s->ob_type->tp_name);

or

PyErr_Format(PyExc_TypeError,"can't intern %.80s", s->ob_type->tp_name);

or

PyErr_Format(PyExc_TypeError,"can't intern %s", s->ob_type->tp_name);

In conclusion, is it %s or %.80s or %.400s?

This patch will add one true way of writing fixed length string of the wrong type. This is just preliminary patch. I'll write the documentation later (and maybe test?).
History
Date User Action Args
2013-12-15 05:23:22vajraskysetrecipients: + vajrasky
2013-12-15 05:23:22vajraskysetmessageid: <1387085002.5.0.729792789255.issue19984@psf.upfronthosting.co.za>
2013-12-15 05:23:22vajraskylinkissue19984 messages
2013-12-15 05:23:22vajraskycreate