Issue1932

classification
Title: Make check for iterability in chain() arguments lazy
Type: Severity: normal
Components: Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, int3
Priority: normal Keywords:

Created on 2012-06-19.07:40:12 by int3, last changed 2012-06-21.19:53:59 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
lazy-chain int3, 2012-06-20.04:48:24
Messages
msg7249 (view) Author: Jez Ng (int3) Date: 2012-06-19.07:40:11
itertools.chain(1) should not throw a TypeError until .next() is invoked on it.

Both this bug and #1931 were detected via running test_itertools.py from the CPython source tree. I'd add the test file here, but quite a number of other tests are failing as well, and I figure it might be simpler to add that file in once I get the rest of the tests to pass.
msg7250 (view) Author: Jez Ng (int3) Date: 2012-06-19.08:55:23
Update patch -- scope variables properly and add check for noKeywords().
msg7254 (view) Author: Jez Ng (int3) Date: 2012-06-20.04:48:24
Make chain.from_iterable() lazy too, as CPython's docs and tests indicate.
History
Date User Action Args
2012-06-21 19:53:59fwierzbickisetstatus: open -> closed
priority: normal
resolution: fixed
nosy: + fwierzbicki
assignee: fwierzbicki
2012-06-20 04:48:25int3setfiles: + lazy-chain
messages: + msg7254
2012-06-20 04:47:41int3setfiles: - lazy-chain
2012-06-19 08:55:31int3setfiles: - lazy-chain
2012-06-19 08:55:24int3setfiles: + lazy-chain
messages: + msg7250
2012-06-19 07:40:12int3create