On Wed, 5 Nov 2003, Guido van Rossum wrote: > I'm okay with adding reversed() as a builtin that works for sequences > only but I'm not okay with adding the __reversed__ protocol. But, doesn't this effectively take the PEP back to the original proposal of a sequence method that it drifted away from? With the restriction to sequences, reversed() is then likely to be implemented as a thin wrapper around seq.somerevmethod() which could then return either a new reversed sequence, an iterable, or an iterator depending upon efficiency, implementation, thread-safety, etc. Since reversed() is turning out not be generally applicable anyway, perhaps going back to the original idea of a sequence method would be a good thing? -a
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4