What to do after Python?

Erik Max Francis max at alcyone.com
Mon Feb 19 08:16:42 CET 2001


Johann Hibschman wrote:

> Well, mine's a bit more efficient, since it doesn't have to maintain
> the loop variable i, it doesn't have to call the function vec.length()
> at each iteration, and it doesn't have to do the full operator[]
> calculation.  It just steps along both of them.
> 
> But phooey on that!  It's bit-twiddling like that which drives me mad
> while writing C++.  :-(

The real reason for going through all the trouble to write that all out
is now that you're using Standard C++ iterators, they will work with
_any_ Standard container.  Not just std::vector, but anyone at all.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ My life was better before I knew you.
\__/ Edith Wharton (to Morton Fullerton)
    REALpolitik / http://www.realpolitik.com/
 Get your own customized newsfeed online in realtime ... for free!



More information about the Python-list mailing list