diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-09-13 21:06:06 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-09-13 21:06:06 +0300 |
commit | 762d57d61a3b3cdd8df1597567ace0c12c4df635 (patch) | |
tree | b99b1ccc1c18807f410caa0123829bcd24188fdd /Python/formatter_unicode.c | |
parent | 9e6772b670e4bfb46fcd51b5ea90e42545d0a420 (diff) | |
parent | 853d7f25c971a131ece09ce42025c41583c3df94 (diff) | |
download | cpython-762d57d61a3b3cdd8df1597567ace0c12c4df635.tar.gz |
Use :menuselection: in whatsnew/3.4.
Diffstat (limited to 'Python/formatter_unicode.c')
-rw-r--r-- | Python/formatter_unicode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index e3a8149841..056bb76902 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -846,6 +846,13 @@ format_long_internal(PyObject *value, const InternalFormatSpec *format, " format specifier 'c'"); goto done; } + /* error to request alternate format */ + if (format->alternate) { + PyErr_SetString(PyExc_ValueError, + "Alternate form (#) not allowed with integer" + " format specifier 'c'"); + goto done; + } /* taken from unicodeobject.c formatchar() */ /* Integer input truncated to a character */ |