Take the __reversed__ protocol out of the pep.
It's champions can argue their case elsewhere. Good luck to them.
This commit is contained in:
parent
d0908a58f4
commit
f2ac224b3f
11
pep-0322.txt
11
pep-0322.txt
|
@ -94,17 +94,6 @@ The name *reverse* is not a candidate because it duplicates the name
|
|||
of the list.reverse() which mutates the underlying list.
|
||||
|
||||
|
||||
Custom Reverse
|
||||
==============
|
||||
|
||||
Objects may optionally provide a *__reversed__* method that returns
|
||||
a custom reverse iterator.
|
||||
|
||||
This allows *reverse()* to be applied to objects that do not have
|
||||
__getitem__() and __len__() but still have some useful way of
|
||||
providing reverse iteration.
|
||||
|
||||
|
||||
Discussion
|
||||
==========
|
||||
|
||||
|
|
Loading…
Reference in New Issue