diff options
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r-- | Doc/library/functions.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 4f86fc7..693af64 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -977,12 +977,16 @@ available. They are listed here in alphabetical order. .. function:: reversed(seq) - Return a reverse :term:`iterator`. *seq* must be an object which supports - the sequence protocol (the :meth:`__len__` method and the :meth:`__getitem__` - method with integer arguments starting at ``0``). + Return a reverse :term:`iterator`. *seq* must be an object which has + a :meth:`__reversed__` method or supports the sequence protocol (the + :meth:`__len__` method and the :meth:`__getitem__` method with integer + arguments starting at ``0``). .. versionadded:: 2.4 + .. versionchanged:: 2.6 + Added the possibility to write a custom :meth:`__reversed__` method. + .. function:: round(x[, n]) |