On PEP 322 (ireverse)
Raymond Hettinger
vze4rx4y at verizon.net
Thu Oct 30 00:36:15 EST 2003
More information about the Python-list mailing list
Thu Oct 30 00:36:15 EST 2003
- Previous message (by thread): On PEP 322 (ireverse)
- Next message (by thread): gc assertion failure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Jeremy Fincher] > Why not a more > comprehensive PEP defining a reverse iteration protocol similar the > protocol we have now for forward iteration? It's in there under the Custom Reverse section. The approach is so simple it doesn't take much elaboration: Objects may define a __ireverse__ method that returns a reverse iterator -- this allows objects without __getitem__ and __len__ to participate in reverse iteration. Raymond Hettinger
- Previous message (by thread): On PEP 322 (ireverse)
- Next message (by thread): gc assertion failure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list