Comment on PEP-0322: Reverse Iteration Methods

Stephen Horne $$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$
Sun Sep 28 02:28:00 CEST 2003

On Sat, 27 Sep 2003 19:48:24 -0400, David Abrahams
<dave at> wrote:

>Stephen Horne <$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$> writes:
>>>> and without that ability to dereference the iterator (1) I cannot see
>>>> the point of iterating through a pair, and (2) the 'iterator' would
>>>> not be a true iterator as C++ iterators have to comply with one of a
>>>> set of standard protocols (forward, bidirectional, random etc) which
>>>> all include subscripting.
>>>I'm pretty well familiar with those protocols - I've been working on
>>>the C++ standards committee since 1997 and have written several
>>>related proposals, c.f.
>> OK - sorry for that.
>No prob.
>> I remain surprised that this degree of specialisation occurs, but
>> it's a case of live and learn I suppose.
>Sorry, what specialization?

Presumably template specialisation - such that the special case of
std::pair<T,T> picks up the iterating functionality that
std::pair<T,U> lacks (begin, end etc). That is what I thought you were

Or am I still getting this wrong?

Steve Horne

steve at ninereeds dot fsnet dot co dot uk

More information about the Python-list mailing list