Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(63615)

Unified Diff: Python/formatter_unicode.c

Issue 8931: '#' has no affect with 'c' type
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_types.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Python/formatter_unicode.c Sat Dec 10 21:25:04 2011 +0100
+++ b/Python/formatter_unicode.c Sat Dec 10 22:20:23 2011 +0100
@@ -792,6 +792,13 @@
" 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 */
« no previous file with comments | « Lib/test/test_types.py ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+