summaryrefslogtreecommitdiff
path: root/Python/formatter_unicode.c
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2015-01-23 19:36:54 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2015-01-23 19:36:54 +0000
commit8fa7954e4ef26dcf377019236cc2171fb8be8355 (patch)
treea1e6fd2f3384fb9656a70174a65ea0a04ffd4861 /Python/formatter_unicode.c
parenta2f7d2bf741a71f23cbf154cc292e610086f431f (diff)
parentc8962fe46dc4b0bfa761087a8e095e0fb001fb34 (diff)
downloadcpython-8fa7954e4ef26dcf377019236cc2171fb8be8355.tar.gz
Closes #23202: pyvenv documentation updated to match its behavior.
Diffstat (limited to 'Python/formatter_unicode.c')
-rw-r--r--Python/formatter_unicode.c7
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 */