[Python-3000] have zip() raise exception for sequences of different lengths (original) (raw)
Guido van Rossum guido at python.org
Thu Aug 31 18:29:32 CEST 2006
- Previous message: [Python-3000] have zip() raise exception for sequences of different lengths
- Next message: [Python-3000] have zip() raise exception for sequences of different lengths
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 8/31/06, Raymond Hettinger <rhettinger at ewtllc.com> wrote:
>How about a keyword-only argument called finish which is a callable to >deal with the problem? When any sequence is exhausted, its position >is filled with StopIteration, and then finish(result) is returned. How about we resist the urge to complicate the snot out of a basic looping construct. Hypergeneralization is more of a sin than premature optimization.
Hear, hear! Hypergeneralization adds features you can never get rid of even though they may only be useful for <1% of the populations. At least unnecessary optimizations can be rolled back safely.
It is important that zip() be left as dirt simple as possible. In the tutorial (section 5.6), we're able to use short, simple examples to teach all of the fundamental looping techniques to total beginners in a way that lets them save their brain power for learning exceptions, classes, generators, packages, and whatnot.
Creative talent is being wasted here just to solve a non-problem. Please keep Py3k on track for cruft removal. We're seeing way too much discussion on random, screwball proposals rather that focusing on what really matters: Keeping the tried and true while removing stuff we've always wanted to take away.
Amen.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-3000] have zip() raise exception for sequences of different lengths
- Next message: [Python-3000] have zip() raise exception for sequences of different lengths
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]