[Python-3000] have zip() raise exception for sequences of different lengths

Barry Warsaw barry at python.org
Thu Aug 31 20:28:14 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 31, 2006, at 12:12 PM, Raymond Hettinger wrote:

> 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.

Without addressing zip() in particular (as I said before, its current  
API is just fine to me), and while agreeing with the general  
principle of keeping things as simple as they can be, I don't believe  
you have to teach all the ins-and-outs of a particular function,  
class, or module as soon as it's introduced in the tutorial.  It's  
perfectly fine to keep the intro examples short and sweet with a  
footnote saying "go here for more advanced usage".  There's a ton of  
stuff in Python that total beginners just don't need to know right away.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iQCVAwUBRPcqQ3EjvBPtnXfVAQJxSAP/Yk2Dqh88iHThSKoqHHr9rURGbO2UWPvt
R4xAFr4QMy4L8GtzLaG3l/RyeG59UwELgZCzRefw/aDuMotLrjrx4KvSb+FIgWmA
r/lwWnF34xWH+oSwD459WotkRIJxVnwCAUOJtiCGYqSKfSEf0z5OwDJfGCRCb6Iv
8RRqoeBlVVQ=
=iT7K
-----END PGP SIGNATURE-----


More information about the Python-3000 mailing list