[issue6080] Itertools objects are missing "send"

2009-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: What do you have in mind for count() or repeat()? How would they use the send() value? -- ___ Python tracker ___ ___

[issue6080] Itertools objects are missing "send"

2009-05-21 Thread Miki Tebeka
Miki Tebeka added the comment: My bad, thought that every iterator is supposed to implement "send". I still think that "count" and "repeat" can support and use it. -- status: open -> closed ___ Python tracker _

[issue6080] Itertools objects are missing "send"

2009-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why would they? There is no use case (the data would be thrown away). Not every iterator has to support the whole generator protocol. -- nosy: +rhettinger ___ Python tracker _

[issue6080] Itertools objects are missing "send"

2009-05-21 Thread Miki Tebeka
New submission from Miki Tebeka : Some (most?) of the itertools functions "generators" do not supprt "send". >>> from itertools import count >>> n = count(0) >>> n.next() 0 >>> n.send(1) Traceback (most recent call last): File "", line 1, in AttributeError: 'itertools.count' object has no att