-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 5, 2007, at 5:45 PM, Greg Ewing wrote:
> Ka-Ping Yee wrote: > >> Just like getattr, two-argument next(iter, sentinel) >> returns sentinel if StopException is caught. > > +1. I've written a number of pieces of code where this > would have made things neater. Just about any place > where I've used .next() explicitly, in fact -- it > always seems awkward having to deal with StopIteration. I agree. Seems like enough of a use case to me to justify built-in fancy schmancy next() and moving .next() to .__next__(). - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBReyj+XEjvBPtnXfVAQK0VAQAufa87C9RM8eBBy5DrSPW8n1ERMUHHreA HtdT6rXt9SlRVckOrz5sHf/QdHa76jpSrLpk6mDBx3i1R93NPSrI+gkagOZhd21a eRLWlW84UotY6kzLFqLSyH1DnlHgad9Oimy9eMZjuf4xK50hU9BKgZNxcl1ogzYa V6udox5tEqU= =pm9U -----END PGP SIGNATURE----- _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com