[pypy-commit] pypy fix-bytearray-complexity: Document that slicing with negative indices isn't support when overriding __getslice__.

waedt noreply at buildbot.pypy.org
Mon Jun 16 16:43:39 CEST 2014


Author: Tyler Wade <wayedt at gmail.com>
Branch: fix-bytearray-complexity
Changeset: r72074:16631b4ddbab
Date: 2014-06-16 09:42 -0500
http://bitbucket.org/pypy/pypy/changeset/16631b4ddbab/

Log:	Document that slicing with negative indices isn't support when
	overriding __getslice__.

diff --git a/pypy/doc/coding-guide.rst b/pypy/doc/coding-guide.rst
--- a/pypy/doc/coding-guide.rst
+++ b/pypy/doc/coding-guide.rst
@@ -352,7 +352,8 @@
   ``__init__``, ``__del__``, ``__len__``, ``__getitem__``, ``__setitem__``,
   ``__getslice__``, ``__setslice__``, and ``__iter__``. To handle slicing,
   ``__getslice__`` and ``__setslice__`` must be used; using ``__getitem__`` and
-   ``__setitem__`` for slicing isn't supported.
+   ``__setitem__`` for slicing isn't supported. Additionally, using negative
+   indices for slicing is still not support, even when using ``__getslice__``.
 
 This layout makes the number of types to take care about quite limited.
 


More information about the pypy-commit mailing list