Eliminate unnecessary test

This commit is contained in:
Raymond Hettinger 2015-10-05 22:52:37 -04:00
parent 8ab4169f5a
commit 0443ac2860
1 changed files with 1 additions and 1 deletions

View File

@ -530,7 +530,7 @@ deque_copy(PyObject *deque)
return NULL;
new_deque->maxlen = old_deque->maxlen;
/* Fast path for the deque_repeat() common case where len(deque) == 1 */
if (Py_SIZE(deque) == 1 && new_deque->maxlen != 0) {
if (Py_SIZE(deque) == 1) {
PyObject *item = old_deque->leftblock->data[old_deque->leftindex];
rv = deque_append(new_deque, item);
} else {