This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.henry
Recipients barry, michael.henry, r.david.murray
Date 2011-03-24.10:41:06
SpamBayes Score 4.5038934e-07
Marked as misclassified No
Message-id <1300963268.46.0.436848246965.issue11606@psf.upfronthosting.co.za>
In-reply-to
Content
David,

Your patch looks fine to me.  I like putting the logic is a
separate class as you've done.  I looked in itertools for
something to perform the job of the each_last() generator I'd
had in my patch, but I didn't see anything.  I like the idea of
encapsulating the test logic of (index + 1 == len(sequence)) in
some way, as each_last() does, rather than having the caller
calculate it.  If that capability exists somewhere in the Python
standard library, it would be my choice to use that.  If it has
to be built just for this test, though, perhaps it's not worth
the extra lines of code to define each_last().

Michael Henry
History
Date User Action Args
2011-03-24 10:41:08michael.henrysetrecipients: + michael.henry, barry, r.david.murray
2011-03-24 10:41:08michael.henrysetmessageid: <1300963268.46.0.436848246965.issue11606@psf.upfronthosting.co.za>
2011-03-24 10:41:07michael.henrylinkissue11606 messages
2011-03-24 10:41:06michael.henrycreate