Issue27443
Created on 2016-07-02 19:53 by serhiy.storchaka, last changed 2016-07-03 12:18 by serhiy.storchaka. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| bytearray_iterator_length_hint.patch | serhiy.storchaka, 2016-07-02 19:53 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg269729 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2016-07-02 19:53 | |
>>> ba = bytearray(b'ab') >>> it = iter(ba) >>> next(it) 97 >>> ba.clear() >>> list(it) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: __length_hint__() should return >= 0 Proposed patch fixes this issue. |
|||
| msg269735 - (view) | Author: Raymond Hettinger (rhettinger) * | Date: 2016-07-02 20:34 | |
This patch looks correct. Nice catch. |
|||
| msg269761 - (view) | Author: Roundup Robot (python-dev) | Date: 2016-07-03 11:42 | |
New changeset 6b084bb6c38b by Serhiy Storchaka in branch '3.5': Issue #27443: __length_hint__() of bytearray itearator no longer return https://hg.python.org/cpython/rev/6b084bb6c38b New changeset 03192909160d by Serhiy Storchaka in branch 'default': Issue #27443: __length_hint__() of bytearray itearator no longer return https://hg.python.org/cpython/rev/03192909160d |
|||
| msg269764 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2016-07-03 12:18 | |
Thanks Raymond. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2016-07-03 12:18:19 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages: + msg269764 stage: patch review -> resolved |
| 2016-07-03 11:42:43 | python-dev | set | nosy:
+ python-dev messages: + msg269761 |
| 2016-07-02 20:34:54 | rhettinger | set | messages: + msg269735 |
| 2016-07-02 19:53:54 | serhiy.storchaka | create | |