mirror of
https://github.com/python/cpython.git
synced 2026-02-01 12:12:05 +00:00
Issue 6089: str.format raises SystemError.
This commit is contained in:
parent
8254d39840
commit
4b94b192ff
3 changed files with 11 additions and 2 deletions
|
|
@ -375,8 +375,9 @@ FieldNameIterator_next(FieldNameIterator *self, int *is_attribute,
|
|||
*name_idx = get_integer(name);
|
||||
break;
|
||||
default:
|
||||
/* interal error, can't get here */
|
||||
assert(0);
|
||||
/* Invalid character follows ']' */
|
||||
PyErr_SetString(PyExc_ValueError, "Only '.' or '[' may "
|
||||
"follow ']' in format field specifier");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue