On Apr 10, 12:52 pm, "spohle" <[EMAIL PROTECTED]> wrote: > hi, > > i use a lot the enumerate in my scripts and got really interested in > possibly writing my own enumerate as an extension, for which i would > want to extend it to be able to pass a start and step attribute. > > can anyone point me on my way with good examples for that and how to > write extensions ? > > thank you in advance
The range() builtin has this functionality. Also check out http://docs.python.org/lib/itertools-functions.html As for writing extensions, check out the following links: http://docs.python.org/inst/tweak-flags.html http://docs.python.org/dist/describing-extensions.html http://www.geocities.com/foetsch/python/extending_python.htm http://cxx.sourceforge.net/ http://www.vrplumber.com/programming/mstoolkit/ Interesting notes on iterators with (or without) a "step()": http://mail.python.org/pipermail/python-bugs-list/2004-February/022007.html http://www.thescripts.com/forum/thread556059.html http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498272 Mike -- http://mail.python.org/mailman/listinfo/python-list