Issue 1526367: str.iter and unicode.iter (original) (raw)

Created on 2006-07-21 09:39 by doerwalter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
diff.txt doerwalter,2006-07-21 09:39
diff2.txt doerwalter,2007-03-17 16:55 Added tests
Messages (6)
msg50726 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2006-07-21 09:39
This patch add iterator classes for str and unicode, as discussed here: http://mail.python.org/pipermail/python-3000/2006-July/002650.html
msg50727 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-03-13 19:41
This looks good, but needs new tests.
msg50728 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2007-03-17 16:55
Code coverage is pretty good without any new tests (see <http://styx.livinglogic.de/~walter/python/unicodeobject.c.gcov>) The only function uncovered is unicodeiter_len (striter_len). I've added a test for this to the new version of the patch (diff2.txt). File Added: diff2.txt
msg50729 - (view) Author: Björn Lindqvist (sonderblade) Date: 2007-06-05 21:43
Patch applies cleanly and works as expected (str.__iter__, unicode.__iter__) and all tests pass.
msg50730 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2007-06-05 22:21
What is the point of this patch for Py2.6? There is nothing broken here. Not every sequence needs it's own __iter__. That is provided automatically. I intentionally left-out strings from when I added __iter__ to tuples, lists, and dicts. There was no compelling speed benefit as there was for the other objects.
msg58747 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-12-18 12:20
Raymond, can this entry be closed? In py3k PyString and PyUnicode have an iterator view.
History
Date User Action Args
2022-04-11 14:56:19 admin set github: 43704
2007-12-18 16:49:43 rhettinger set status: pending -> closed
2007-12-18 12:20:39 christian.heimes set status: open -> pendingnosy: + christian.heimesresolution: rejectedmessages: + components: + Interpreter Core, - None
2006-07-21 09:39:44 doerwalter create