Tyler Wade  committed 7faf6b6

Document new magic method support

  • Participants
  • Parent commits b2b6301
  • Branches fix-bytearray-complexity

Comments (0)

Files changed (1)

File pypy/doc/coding-guide.rst

-  Normal rules apply. Special methods are not honoured, except ``__init__``,
-  ``__del__`` and ``__iter__``.
+  Normal rules apply. The only special methods that are honoured are
+  ``__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.
 This layout makes the number of types to take care about quite limited.