Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99b7b1c commit b8fb197Copy full SHA for b8fb197
1 file changed
Objects/listobject.c
@@ -359,14 +359,8 @@ list_repr(PyListObject *v)
359
360
_PyUnicodeWriter_Init(&writer);
361
writer.overallocate = 1;
362
- if (Py_SIZE(v) > 1) {
363
- /* "[" + "1" + ", 2" * (len - 1) + "]" */
364
- writer.min_length = 1 + 1 + (2 + 1) * (Py_SIZE(v) - 1) + 1;
365
- }
366
- else {
367
- /* "[1]" */
368
- writer.min_length = 3;
369
+ /* "[" + "1" + ", 2" * (len - 1) + "]" */
+ writer.min_length = 1 + 1 + (2 + 1) * (Py_SIZE(v) - 1) + 1;
370
371
if (_PyUnicodeWriter_WriteChar(&writer, '[') < 0)
372
goto error;
0 commit comments