[Python-3000] have zip() raise exception for sequences of different lengths (original) (raw)
Barry Warsaw barry at python.org
Thu Aug 31 17:44:53 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 ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Aug 31, 2006, at 11:38 AM, Jim Jewett wrote:
On 8/30/06, Barry Warsaw <barry at python.org> wrote:
What about a keyword argument called 'filler' which can be an n-sized sequence or a callable. 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.
Nice!
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRPcD+3EjvBPtnXfVAQKviQP/fEcBu7t2iXEfBom3flvDgcoauJp+/XSS s2zdIivkQAZgs8kmbtYpk0R4KPyIUhyjHahzcxvUKKXGakfpIl73FBGSK+XfG/iq IqQ33dW4Gl6YBt9HpOLVd0NP1RWUGl+QNegLP2ihgLoRFi0QK8fBj0FPoxHdHrfu rIGXwJe6Qlg= =0PRM -----END PGP SIGNATURE-----
- 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 ]