Collection interfaces

Alex Martelli aleaxit at yahoo.com
Tue Feb 27 02:06:57 EST 2001


"Topmind" <topmind at technologist.com> wrote in message
news:MPG.1504d14563dce6499896af at news.earthlink.net...
    [snip]
> The main point is that you *do* stack operations on a collection.

I may be missing your point.  In Standard C++, you may
_adapt_ *some* collections for use as a stack -- that is
what std::stack is for, it's an ADAPTER.  But *NOT* all
collections are usable as 'stacks' -- only those on which
order of insertion is significant and recorded; what would
it make to 'pop' the 'top' (what top?) of a multiset, say?


Alex






More information about the Python-list mailing list