[Python-Dev] Issue #16153: PyUnicode_FromFormatV() must fail if the format string is invalid (original) (raw)
Victor Stinner victor.stinner at gmail.com
Mon Oct 8 23:23:59 CEST 2012
- Previous message: [Python-Dev] Issue #16153: PyUnicode_FromFormatV() must fail if the format string is invalid
- Next message: [Python-Dev] Issue #16153: PyUnicode_FromFormatV() must fail if the format string is invalid
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2012/10/8 Barry Warsaw <barry at python.org>:
Does anyone know if there is a good reason why PyUnicodeFromFormatV() does not fail on invalid format string, but copies the format string as-if into the result?
I would like to change this to raise a ValueError instead. PyUnicodeFromFormatV() is used by PyErrFormat(), so PyErrFormat() may now fail with a ValueError if the format string is invalid. This behavior is inherited from PyUnicodeFromFormat() which documents the current behavior, so you can't change this in backward incompatible way.
Yes, the current behaviour is documented, but I consider it as a bug. Would it be possible to change the behaviour to fix a "bug"?
Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20121008/c15b8fdf/attachment.html>
- Previous message: [Python-Dev] Issue #16153: PyUnicode_FromFormatV() must fail if the format string is invalid
- Next message: [Python-Dev] Issue #16153: PyUnicode_FromFormatV() must fail if the format string is invalid
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]