[New-bugs-announce] [issue1335] bytesiterator patch

Christian Heimes report at bugs.python.org
Fri Oct 26 15:50:39 CEST 2007


New submission from Christian Heimes:

Here is the long promised bytes iterator view. It was much, *much*
easier to write it than I have thought. In fact I spent more time fixing
the indention than to modify the code from striterator.

I haven't written an unit test for it. The other iterators don't have
extra tests, too.

>>> iter(bytes(b"abc"))
<bytesiterator object at 0xb7cc578c>
>>> for i in iter(bytes(b"abc")): print(i)
...
97
98
99
>>> for i in bytes(b"abc"): print(i)
...
97
98
99

----------
components: Interpreter Core
files: py3k_bytesiterator.patch
messages: 56789
nosy: gvanrossum, tiran
severity: normal
status: open
title: bytesiterator patch
type: rfe
versions: Python 3.0
Added file: http://bugs.python.org/file8619/py3k_bytesiterator.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1335>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: py3k_bytesiterator.patch
Type: text/x-diff
Size: 4646 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20071026/f0a8f418/attachment.patch 


More information about the New-bugs-announce mailing list