summaryrefslogtreecommitdiff
path: root/documentation/index.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-04-19 14:55:20 -0400
committerBenjamin Peterson <benjamin@python.org>2013-04-19 14:55:20 -0400
commit3f75545c7baf8544f24b23303f91e879703643d8 (patch)
tree35349f293dedeeeb0b24404885be1e2718d4870e /documentation/index.rst
parenta47db2f576108590756b8e5360bf29b6f02a9ab0 (diff)
downloadsix-3f75545c7baf8544f24b23303f91e879703643d8.tar.gz
add iterbytes and indexbytes
Diffstat (limited to 'documentation/index.rst')
-rw-r--r--documentation/index.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/documentation/index.rst b/documentation/index.rst
index ee92f89..bf3c5d1 100644
--- a/documentation/index.rst
+++ b/documentation/index.rst
@@ -325,6 +325,18 @@ string data in all Python versions.
equivalent to :class:`py2:chr` in Python 2 and ``bytes((i,))`` in Python 3.
+.. function:: indexbytes(buf, i)
+
+ Return the byte at index *i* of *buf* as an integer. This is equivalent to
+ indexing a bytes object in Python 3.
+
+
+.. function:: iterbytes(buf)
+
+ Return an iterator over bytes in *buf* as integers. This is equivalent to
+ a bytes object iterator in Python 3.
+
+
.. data:: StringIO
This is an fake file object for textual data. It's an alias for