Nick Coghlan wrote: > In the example below (printing the first 3 items of a sequence), the fact that > sorted() produces a new iterable list, while reversed() produces an iterator > over the original list *should* be an irrelevant implementation detail from > the > programmer's point of view.
You have to be aware on some level of whether or not you're using a list when you use slice notation -- what would you do for iterators when given a negative step index? Presumably it would have to raise an exception, where doing so with lists would not... Steve -- You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com