[Python-3000] PEP: rename it.next() to it.next(), add a next() built-in (original) (raw)

Barry Warsaw barry at python.org
Mon Mar 5 20:12:01 CET 2007


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

On Mar 5, 2007, at 2:07 PM, Ka-Ping Yee wrote:

One possibility for making a next() built-in more useful:

Just like getattr, two-argument next(iter, sentinel) returns sentinel if StopException is caught. If you've used .next() explicitly, would this be handy?

Yes.

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

iQCVAwUBRexrgXEjvBPtnXfVAQLjsAP/UxgXDQ37pLPvIVcE8RouqZVwWAUZtYef d0vubjBFXfaT1aBpnrk0YLcg55Xqd/+LkOXl5UZdO8FYyi4ucGRAZ8Kz1P1T9g+k TbTumxCa9Qzj8ockoJv7vJ3+K1jOS0A05hjeOq93jROTWtdyxqcBUDvTY2lQn34J ZK5L0KFwz+E= =qjFx -----END PGP SIGNATURE-----



More information about the Python-3000 mailing list