[Python-Dev] Documentation Error for hash (original) (raw)

Terry Reedy tjreedy at udel.edu
Thu Aug 28 23:55:14 CEST 2008


Jeff Hall wrote:

I'm not sure about the first but as for the reversed we had a discussion yesterday and it was indeed added in 2.4 (oddly, my 2.5 documentation has this correct... )

2.4 doc: reversed( seq)

Return a reverse iterator. seq must be an object which supports the sequence protocol (the len() method and the getitem() method with integer arguments starting at 0). New in version 2.4.

[no mention of reversed]

3.3.6 Additional methods for emulation of sequence types

[ditto]

However, I confirmed that reversed is used by reverse()

class C: def reversed(self): return 'abc'

c=C() print(reversed(c))

abc



More information about the Python-Dev mailing list